set_target scans existing switches for -mmacosx-version-min=VVVV and adds (or
replaces) -target x86_64-apple-macosVVVV.
This is to address build systems that infer a default -target and ignore
-mmacosx-version-min.
Express everything in terms of _find, which does the only looping, and a pair
of _test_sw and _test_re functions that are themselves passed to _find,
_remove and _replace to differentiate equality test from regexp match.