Trigger warning for bad use of transactions.
Mediawiki currently does not support nested transactions, which means that
starting a transaction while another is in progress will silently commit
the previous transaction, causing lots of potential inconsistency.
This change introduces checks that will log a warning whenever begin() is
used while a transaction is already in progress, and whenever commit() or
rollback() are used without a transaction being in progress.
NOTE: this exposes several places in the code where transactions have inadvertedly
be nested, or unmatched calls to begin() resp commit() are used. With
$wgDevelopmentWarnings enabled or I36583fb0 merged, this may cause tests to fail.
The following changes fix the issues in question: I80faf2ed, Ia225251e, Iff394f97,
and I20d90fed.
Change-Id: I8c0426e12b78edbd758b1f087c35dabd64498624