A simpler implementation that works better for all adapters. (https://github.com/pouchdb/pouchdb/issues/445)
Make jslint happy.  I probably fixed a multiple attachment bug with leveldb here.