Implement rollback in filestore.

Move IndexedDB to its own namespace, clean ups and refactorings.