Add support for specifying serialization/deserialization flags for scene nodes in the scene state stack.

This is going to allow us to control whether or not the OnSerialize and OnDeserialize script
events should be called. When editing, we don't want to do this because all we care about is
undo/redo - doesn't make sense in that context.
Fix the previous commit.
Initial work on moving game event handling over to the new game state manager system.

The idea behind the new game state management system is to have a central
manager for controlling the game state. This will make it easier to do things
such as saving the state to a file (save games) and loading it back up again
(load games).

This is very early work - the API will change going forward.
Add the foundations for saving and restoring the state of a game.

This is the foundations for doing save/load games. Nothing in this commit has been tested.