implements fake 'save' backend

There is a separate, not-open-source server component that does the
saving. This implements an in-memory save that can serve for development purposes.
fixes inMemorySaved variable location

The scoping was wrong, so it was being re-created on each request.
Render index when saved url is requested

Theoretically, this could be a problem, if say the random function save
something to a url that is otherwise valid... but idc about that
really.
factors duplicated split functionality into variable

Getting the special first key is used multiple times, extract variable.
adds method to restore fake sessions

These set the data in the preferred session format, reads index,
replaces the magic SESSION_PLACEHOLDER with the required contents, and
returns the corrected index file.