First addition of IndexedDB code. Extends the interface built in the last
commit. This needs major testing.