gprofng: fix display gmon option error handling

Parse display gmon options only once so invalid arguments are not
reported twice and exit status is set to failure for invalid usage.

Also add tests in gp-gmon.exp to verify unknown options and missing
-o argument fail as expected and produce a single diagnostic.

gprofng/
	* src/gp-gmon.cc (usage_and_exit): New function.
	(check_mods): Change number of parameters.
	(checkflagterm): Fix error text, update to use new functions.
	* testsuite/gprofng.display/gp-gmon.exp: Add new test.
2 files changed