Needs perl-5.18 for Yosemite
Remove tests for unsupported OS X.
Don't test for later OS X if we've already defined $perlexe.
We're on x86_64 only, so save a test.
Remove -Wno-error=unused-command-line-argument-hard-error-in-future using clang 6+

The -Wno-error=unused-command-line-argument-hard-error-in-future flag is no longer supported or necessary in clang 6 so only add it for clang 5. Also simplify the clang version checking code since bash doesn't let one really compare version numbers in the form of "x.y.z". Only compare "x" since that's all we need.