Draft: Honor configured sleep setting when the system transition to battery with the lid already closed
Currently tested successfully on 4.16.0, rebased on top of master. Will test on top of 4.18.0.
Currently tested successfully on 4.16.0, rebased on top of master. Will test on top of 4.18.0.