Set up Gradle build system

Here is our initial Gradle and Junit configuration. There are some somewhat weird dependencies on my other outstanding pull request but this can be reviewed in isolation.