Make doEditContent call $dbw->rollback() if exception happens
doEditContent calls a variety of methods in the middle of its
database transaction that can throw exceptions. For example if
$revision->insertOn() throws an exception, it can cause
referential integrity issues unless the transaction is rolled
back by something further up the chain (Thus see I5807e, I8f1da5).
It seems like it would be more reliable if doEditContent rolled
back its own transaction in exceptional circumstances. So this
patch puts everything in a try block, and does rollback if
an exception happens.
Bug: 63145
Bug: 32551
Change-Id: Icc44687da4edb1a72f13d2b95bfee2eea3ad6808