Add --warnings-exit-nonzero option.

Forces exiting with code 2 when warnings present.

Fixes: #347