Added testing and improved build system

Introduced [the Catch C++ test
framework](https://github.com/philsquared/Catch) into the project and
added basic tests.

Migrated from GNU Make to Gradle in order to facilitate the new testing
capabilities. Tests can be automatically built and run by using the
command `gradle run` or `./gradlew run` if Gradle is not installed on
your system. Tests can be automatically run as source files are updated by
using `gradle autotest`. The main executable (currently not very
impressive) can be run with `gradle run`.