Improve couch doc diff (#3761)

Both the couch document and the second paramter will be pretty printed
before comparison so differences in spaces etc. do not matter.
All keys starting with an underscore on the couch such as _id and _rev
will be removed before the comparison - we assume we want to compare
the real data, not the metadata about the document as we usually do not
know or care about what the id and revision will be.