Detect whether cc (the linker) is gcc or clang.

Detect whether cc (the linker) is gcc or clang.

Use this information to drive which options are added to the `cc`
command line arguments.

As a drive-by, fix an english grammar mistake in a comment.

This is meant to be, in part, a more robust version of PR #17192.

Fix #17214.
I'm a little uncomfortable with `fail!()` because compilers can do really weird things sometimes. Could we use a `UnknownArguments` enum instead?

Also, invoking a process can be pretty expensive if it happens many times for a very small compilation, is there any way that we could cache this output to make sure we only run it once? It looks like `get_cc_prog` is called in a loop from a couple of places.