build: gh672 Fix CMake CXX_FLAGS inheritance
Some sub-projects were overwriting CMAKE_CXX_FLAGS instead of
inheriting from the parent. This keeps any user settings outside
or above the top CMakeLists.txt file from reaching these sub-projects.
These fixes include preserving the inheritance, adding extra flags
to turn off warnings (mostly in autogen code) because the top
level turns on Wall, and trivial code fixes to avoid the need to
add a setting to turn off a warning for those trivial fixes.
These changes should have no impact on Windows.
Change-Id: I0c3c175cb5058f26a259ee3f4fde9fdaf3e6b00d