Fix test suite to provide a better debugging experience.
* bzrlib/tests/TransportUtil.py:
(TestCaseWithConnectionHookedTransport.setUp.cleanup): hooks are
installed on demand but always reset if installed.
(TestCaseWithConnectionHookedTransport.install_hooks,
TestCaseWithConnectionHookedTransport.reset_hooks): New methods
giving a finer control on when hooks are active.
* bzrlib/tests/commands/test_push.py:
(TestPush.test_push): Install hooks when necessary.
* bzrlib/tests/commands/test_pull.py:
(TestPull.test_pull): Install hooks when necessary.
* bzrlib/tests/commands/test_missing.py:
(TestMissing.test_missing): Install hooks when necessary.
* bzrlib/tests/commands/test_merge.py:
(TestMerge.test_merge): Install hooks when necessary.
* bzrlib/tests/commands/test_init_repository.py:
(TestInitRepository.setUp): Install hooks when necessary.
* bzrlib/tests/commands/test_init.py:
(TestInit.setUp): Install hooks when necessary.
* bzrlib/tests/commands/test_checkout.pyL
(TestCheckout.test_checkout): Install hooks when necessary.
* bzrlib/tests/commands/test_cat.py:
(TestCat.test_cat): Install hooks when necessary.
* bzrlib/tests/commands/test_branch.py:
(TestBranch.setUp): Install hooks when necessary.