Add code quality tests to travis-ci

**THIS CURRENTLY BREAKS THE TESTS**

This changes adds a lot of code quality checks and code style checks.
This currently reports a failure as a result. Please see the build output in travis to see the (*very long*) list of things to fix