sdm: Reset pending_doze_ state if next state no longer doze

-Previously checking for setting active_ and state_ were done
without check of pending_doze_. Latest fix changed checks state
instead of state_. If leaving doze to power on state while
pending_doze_ is true, we fall in situation where pending_doze_
does not reset until after it is checked. Reset pending_doze_
state if leaving doze before check should be done.
-Allow display mode changes as long as panel is not active
nor pending doze nor pending power on

Bug: 157783284
Test: suspend/resume/AoD for 1000 cycles
Change-Id: I8cfb933c6d7403c41394f1cb7b295db7dcb0b73e
2 files changed