C++: Enable stricter warnings

This PR adds a number of additional compiler warnings to the existing set of warnings.  It fixes up any issues warned about after enabling the warning (for clang) in the same commit.  These are all the commits with a `cmake` prefix.  It then fixes the warnings found using GCC 4.8; in commits with a `cpp` prefix.

Testing: build and run the testsuite with `make test`.