build: quiet annoying warnings without adding new ones
build: quiet annoying warnings without adding new ones

Disabling warnings can be tricky, because doing so can cause a different
compiler to create new warnings about unsupported disable flags. Also, some
warnings don't surface until they're paired with another warning (gcc). For
example, adding "-Wno-foo" won't cause any trouble, but if there's a legitimate
warning emitted, the "unknown option -Wno-foo" will show up as well.

Work around this in 2 ways:

1. When checking to see if -Wno-foo is supported, check for "-Wfoo" instead.
2. Enable -Werror while checking 1.

If "-Werror -Wfoo" compiles, "-Wno-foo" is almost guaranteed to be supported.

-Werror itself is also checked. If that fails to compile by itself, it likely
means that the user added a flag that adds a warning. In that case, -Werror
won't be used while checking, and the build may be extra noisy. The user would
need to fix the bad input flag.

Also, silence 2 more additional warnings that can show up post-c++11.

(cherry picked from commit 63b3111f84daa421abc2889a550e86c17bf9609d)

biblepay/biblepay,ionomy/ion,crowning-/dash,UdjinM6/dash,dashpay/dash,UdjinM6/dash,crowning-/dash,biblepay/biblepay,dashpay/dash,crowning-/dash,ionomy/ion,nmarley/dash,ivansib/sibcoin,nmarley/dash,terracoin/terracoin,BlockchainTechLLC/3dcoin,thelazier/dash,biblepay/biblepay,ivansib/sibcoin,biblepay/biblepay,biblepay/biblepay,ivansib/sibcoin,terracoin/terracoin,ionomy/ion,thelazier/dash,UdjinM6/dash,crowning-/dash,crowning-/dash,thelazier/dash,BlockchainTechLLC/3dcoin,thelazier/dash,ivansib/sibcoin,UdjinM6/dash,terracoin/terracoin,biblepay/biblepay,ivansib/sibcoin,terracoin/terracoin,nmarley/dash,BlockchainTechLLC/3dcoin,BlockchainTechLLC/3dcoin,nmarley/dash,terracoin/terracoin,UdjinM6/dash,BlockchainTechLLC/3dcoin,biblepay/biblepay,nmarley/dash,dashpay/dash,ionomy/ion,biblepay/biblepay,BlockchainTechLLC/3dcoin,ionomy/ion,nmarley/dash,ionomy/ion,terracoin/terracoin,nmarley/dash,crowning-/dash,thelazier/dash,dashpay/dash,dashpay/dash,ivansib/sibcoin