Split Document out into its own header/source file.
Major refactoring to support multiple key/value stores per file

Key/value API extracted into KeyStore class.
Database and Transaction inherit from KeyStore providing access to the
default k/v store. Other instances can be created given a Database
instance and a name.