Use the correct identifier for the OS X operating system.

This is consistent with other areas of Qt:
qmake, Qt.platform.os (QML), qbs.targetOS (QBS), and #define Q_OS_OSX.

Change-Id: Ibf98e6ba3556a14187dadae1b0235e9c907c9001
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Add QMenu -> NSMenu conversion functions.

Add QMenu::toNSMenu() and QMenuBar()::toNSMenu().
Add QMenu::setAsDockMenu and qt_mac_set_doc_menu(QMenu *menu)

These are all API wrappers around implementation
in the Cocoa platform plugin.

Change-Id: I927ed4fb5dc42cc577a41a80b531a4a2f7b8812c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Add Mac type conversion functions to QtCore

New API:
    static QString QString::fromCFString(CFStringRef string);
    CFStringRef QString::toCFString() const;
    static QString QString::fromNSString(const NSString *string);
    NSString *QString::toNSString() const;

    static QUrl QUrl::fromCFURL(CFURLRef url);
    CFURLRef QUrl::toCFURL() const;
    static QUrl QUrl::fromNSURL(const NSURL *url);
    NSURL * QUrl::toNSURL() const;

Add Q_OS_MAC-protected function declarations to header
files, add implementation to _mm files.

CF and NS types are forward-declared in the header
files to avoid including the CoreFoundation and Foundation
headers. This prevents accidental use of native types
in application code. Add helper macros for forward-
declaration to qglobal.h

Add cf_returns_retained/ns_returns_autoreleased attributes
to toCFString() and toNSURL(). These attributes assists
the clang static analyzer. Add Q_DECL_ helper macros
to qcompilerdetection.h.

Add test functions (in _mac.mm files) to the QString
and QUrl tests. Split out the test class declarations
into a separate headers files.

Change-Id: I60fd5e93f042316196284c3db0595835fe8c4ad4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>