(#2311) - clean up the local changes object
(#2054) - implement PouchDB.defaults

This also fixes a few bugs in how opts.db
is used in leveldb.js, namely:

1. the leveldown object was overriden globally in the browser
2. databases with the same names but different backends collided