My own crappy attempt at wrapping IndexedDB up all nice and proper-like.