Makes CouchDB failure logging more modular
Adds function to clean up failed CouchDB history
Runs bundle before rpush
Fixes CouchDB history names