Drop Python requirement for tests to 3.4 from 3.5
Ubuntu Trusty's Python 3 package supplies 3.4, so this makes it possibly to run the tests on Trusty machines without manually installing Python 3.5. To allow running inside Docker, create our own virtualenv for Python test dependencies (e.g. `jinja2`). Don't use the virtualenvs supplied by Travis. Make sure to install some extra Python bits that aren't installed by default for Docker. Rewrite testing code to avoid APIs introduced in Python 3.5. Use block indent and early return in tests.