All the repetition here sucks, but it's the only way I could figure out to get browserify to behave.  Maybe it's fixed in the latest browserify version.

Basically what I'm doing is trying to sub out as much shared functionality as possible (merge, errors, utils, etc.), which browserify would normally include from `leveldb.js` but which we can actually just grab from `window.PouchDB` when we run in the browser.  It cuts down the size of the plugin file.