DozeMachine: Improve resilience against out-of-order pulse requests

Fixes a class of bugs that arise from requesting to pulse at
inopportune times. Also improves logging such that we know what
state transition failed to validate.

Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: If0bbe003c4805fd180d013dadbc28addc5bb0dd4
Fixes: 32869355
2 files changed