st/gui: Refactor out GUI state tracker into a re-usable base
Split the GUI state tracker into a base and the rest of the GUI that was used
to make the monado-gui project. This greatly reduces the number of dependancies
brought into a minimal gui target and as such makes it easier to re-use.
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2399>