SystemTask state refactor
Currently SystemTask is somewhat fragile to duplicate state transitions and unusual state transition message orders. Most notably this can cause it to get stuck in GoingToSleep in some scenarios.
This PR introduces GoToSleep() and changes GoToRunning() as immediately executable functions. The guarantee that state transitions happen immediately reduces complexity when it comes to ensuring the device is awake for events such as Chimes
Fixes part of #1790 #2012 (there may be other issues contributing to these, but this is probably part of it)
Build size and comparison to main:
| Section | Size | Difference |
|---|---|---|
| text | 378868B | -32B |
| data | 948B | 0B |
| bss | 63488B | 0B |
Inverted state check to make adding new states smoother
I'm pretty terrible at graphics but I'll give it a go!
Updating InfiniSim to support the newly used function uxQueueMessagesWaiting https://github.com/InfiniTimeOrg/InfiniSim/pull/151