(#80) - Make sure console.log is a function

Small fix for versions of IE where (typeof console.log === 'object')
(daleharvey/pouchdb#1658) - register dependent dbs

This ensures that map/reduce's dependent dbs
are registered, so that PouchDB can clean them
up when their parent databases are destroyed.
(#1658) - rename upsert