DO NOT MERGE: Fix sync issue with handling display state changes

We may miss some state changes if a display state change comes between
processDisplayChangesLocked and commitTransactions. Fix this by grabbing
the state lock for the duration of display updates in commit.

Test: steps in bug

Bug: 330105711, 330103914, 328539539
Change-Id: I4798961551f78d75c45ead6dea5ebca895e5ef7d
3 files changed