Mouse position control refactoring

This pull request refactors the mouse position control to use the frame state architecture. Some of the nice features of this are that the mouse position is updated even while the map is animating, and that these updates are synchronized with the map rendering.