* Store the page state in localforage

The first run flag is a bit ugly but necessary to not save the page while loading. Fixes issue #37