Hopefully make better use of gtest.

Changed the CMakeLists to look for gtest, and changed the test to
use gtest's own main function.