Write test that reproduces HTTP test stalling condition.

The condition would happen when a HTTP server would keep the connection open
without sending any data. The problem lied in the fact that we were not
properly cancelling tests that should have been cancelled.

This was happening because of 2 reasons:
1) We should not be checking to see if self._running.called is True since it is
possible that such deferred has been called, but the it has not yet made it's
way down the callback chain to the ooni registered callbacks.
2) We must call the cancel() method after we have called the failed() method.
Failing to do so will lead to the newly scheduled timer to be cancelled instead
of the previous one.
Silence the dummy protocol
Properly handle the cancelled failure.
Fix import error in test_managers.
Merge pull request #275 from TheTorProject/fix/test_timeout

Write test that reproduces HTTP test stalling condition.
Properly expand the home directory to that of the user running ooniprobe.

Previously when running ooniprobe under sudo you would not get the correct home
directory because $HOME was set to that of the user running sudo.
Merge pull request #280 from TheTorProject/fix/ooni_home_fix

Properly expand the home directory to that of the user running ooniprobe...
Bug-Fixes-for-tls_handshake
DNS-host-resolution-for-tls_handshake
Minor fixes to comments
Merge pull request #281 from arunpandianp/master

DNS Host Resolution for tls_handshake
Make GeoIP AS and GeoIP City soft dependencies.

Allows ooniprobe to report back the country of the probe even if no GeoIP ASN
and City database is present.
Merge branch 'master' of github.com:TheTorProject/ooni-probe

* 'master' of github.com:TheTorProject/ooni-probe:
  Minor fixes to comments
  DNS-host-resolution-for-tls_handshake
  Bug-Fixes-for-tls_handshake
Merge branch 'master' into feature/improve_unittesting

* master:
  Make GeoIP AS and GeoIP City soft dependencies.
  Minor fixes to comments
  DNS-host-resolution-for-tls_handshake
  Bug-Fixes-for-tls_handshake
  Properly expand the home directory to that of the user running ooniprobe.
  Fix import error in test_managers.
  Properly handle the cancelled failure.
  Silence the dummy protocol
  Write test that reproduces HTTP test stalling condition.

Conflicts:
	ooni/nettest.py
Make the geoip related tests make a less stronger assertion.