Simple State-like monad transformer where states can be saved to and restored from an internal stack.