Reworked bookmark hash code

* The encoding/decoding functions were too confusing, so I rewrote them.
The bookmark has should now be sufficient to reproduce the entire game
state (barring, of course, variable data that can't be JSON serialised).
* Now, variable-setting links that occur 'between' history entries are
now stored in a history[n].linkVars object, for both Sugarcane and
Jonah.
* This code should now work in IE 8 as well.
* Also added a 'bookmark' option to StoryOptions, which controls the
availability of the 'Bookmark' link.