(#129) - smarter upsert, only updates doc when necessary

See pouchdb/pouchdb#1988 for a similar change to `upsert` there.

Also note that `_deleted` is never set to `true` for the `_local/mrviews` doc, so there's no point in setting it to `false`.