Couchdb module changes for functional bigcouch branch