Add ability to mark gamestates as paused. Fix #1825

Instead of having to pass around the level, we add a new method `stack`
that marks the current gamestate as paused. This will have no effect on
non-level gamestates. Nodes also don't have to have a reference to the
level to make this work.