Reduce use of monolithic sets of compiler flags

This prepares to fix the Redmine issue below (but perhaps could
be folded into it).

Refs #1038

Change-Id: I6407dbbd331e58c30ab1b275748a211040c9c414
Merge "Reduce use of monolithic sets of compiler flags" into release-4-6