Tidied up target triple OS detection. NFC

Use Triple::isOS*() helper functions where possible.