Added enhanced handling of implicit commits.

Now if we are inside a transaction, every statement is checked to see if it
is a statement that causes an implicit commit. If it is a statement then we
will throw an exception. This helps in catching this situation where it
happens instead of noticing way at the end of the tests.

Also added a thing that transforms 'TRUNCATE TABLE foo' to 'DELETE FROM foo'
because 'TRUNCATE TABLE' causes and implicit commit and both Drupal and
CiviCRM use that a lot.
Without this 'START TRANSACTION' doesn't work.