Update: Detect noop updates sent with doc_as_upsert

This should help prevent spurious updates that just cause extra writing
and cache invalidation for no real reason.

Close #6822