Persistence layer is now pretty nabu-agnostic. It no longer knows anything
about key.Type, which is good.

Encoding / decoding values for storage is up to the database, which feels
better, but the implementation is still off. The use of a bytepool seems
silly. Still, thanks to this change, indexes loaded via LoadSort are now
persisted and reloaded on startup.

Indexes and documents are stored via isolated storage instance. On load,
this lets us avoid checking each record to see whether its a document.