Add build to war file, gradle wrapper support.

Seems like I was probably running a very old version of Gradle
previously, as I seem to remember that it built to a war file by
default. In the latest 2.1 version now though, you have to explicitly
add the 'war' plugin to enable building to war file.

Also added the gradle wrapper files, so we can build on systems without
gradle.