177439519: warningsAsErrors should not turn on issues

This CL special cases the -Werror and -w modes such that instead of
using the severity in the overriding configuration, they use the
severity from more specific configurations to decide whether it's a
warning that should be promoted to error or disabled.

Test: New unit test added
Fixes: 177439519
Change-Id: Iec720c782ccdd16103010af8fc860d33d5b2af89
2 files changed