Revert changes to MergeOp to batch object inserts and ref updates

The failure modes for these are problematic, making the cure worse
than the disease. Unlike a missing PatchSet record in the database, a
missing PatchSet ref causes the change screen to fail to load, and
even once abandoned, causes reindexing to fail.

A longer-term rewrite of MergeOp begins with I0771f5e8, which is
designed to have less problematic failure modes, but until then, just
revert.

This mostly reverts the following commits (except for some cleanups
and new helper methods that are not used now but will be eventually):
  c20148c8e20d62744c3654e73fb9d7256f30a205
  5dea1c0fc001e0060e2b1c2ce098d09ff5f6621a

Change-Id: Id691318a6e28f18860b34a9a39f6e834161ff0dd
12 files changed