Revamped CMake; suppressed warnings; bug fixes

Revamp CMake build system to be more flexible, and (hopefully) work on
more OSes.  Also found ways to get rid of a variety of warnings, by
changing flags (such as the exception handling flag), and by fixing the
code (addMissingModifiersInternal in particular looked like it was set
up to crash, as it was using uninitialized pointers).