Fixed #20392 -- Wrapped TestCase into a class-wide transaction
Refactored some tests to take advantage of #20392

Refactored queries tests following #20392

Refactored select_related tests following #20392
Turn some TestCase into TransactionTestCase following #20392
Tests that need to close the connection are not compatible with the concept of a global transaction wrapping the whole TestCase
Made test suite compatible with MySQL following #20392

MySQL cannot rollback a transaction once table schemas are modified.