Warn about all nested transactions when testing.
This change causes implicit commits caused by consecutive calls to
Database::begin() without intermediate calls to Database::commit() to
be more easily tracable. The changes introduced are:
* $this->doCommit( $fname ) is now called unconcitionally if there is
an open transaction. Previously, it was not called if there were no
write operations performed in that transaction.
* A warning about implicite commits (nested transactions) is now issued
if write operations were performed OR ther DBO_TRX flag is NOT set. This
causes any unmatched calls to begin() to trigger an error in CLI mode,
notably also within unit tests.
* Implicit commits of non-write transactions in DBO_TRX mode can now be
logged by enabling $wgDebugDBTRansactions.
Besides this, this change improves the documentation of the transaction
control functions.
The rationale is that implicite commits should be more easily tracable
in production and development.
Change-Id: I1e746322c36a7c53b545bfe78e252a13cce44ea1