Implemented saving and loading state (locally).

Auto-updates the state JSON every time you do anything. Hitting the
“Load State” button will load a pre-created map state.