Overhaul to how UI focus and state changes are handled

- Improved and simplified focus and state changes for the UI system.
- Removed a bunch of duplicate focus handling code within specific controls
- Changed the meaning of the "consumeInputEvents" property for controls. When this property is false now, controls do not receive any input whatsoever. This may be renamed to "acceptInput" in a future update.
- Various other fixes and improvements to UI.