Added unit testing.

The unit tests use googletest (gtest). LLVM's sample project does not
include the unittests directory so it had to be copied in and tweaked.