Fauxton: test for globals

As a developer, I don't want to accidentally pollute the global
namespace and rely on global state.
Fauxton: remove superfluous console.log
Fix stats
fix permissions
fix activetasks
fix auth
fix pouchdb.mapreduce.js
fix documents