Add User-Agent string and JUnit tests

This pull request:

* rewrites the build.xml file based on the build.xml file from skeeto/sample-java-project,
* adds a User-Agent string to the API requests, e.g., `Toopher-Java/1.0.0 (Java 1.7.0_17)`, and
* adds tests to validate the default base URL and the version string.