Fix up and namespace clock_gettime and clock_getres for MacOS
Summary:
Resolve two issues with folly's clock_gettime() shim on Apple platforms (iOS, macOS, etc.):
When detecting whether folly should define clock_gettime() on Apple platforms, don't assume clock_gettime() is declared in Apple's headers just because MAC_OS_X_VERSION_10_12/__IPHONE_10_0 is defined. Someone might use a newer macOS or iOS SDK (which defines MAC_OS_X_VERSION_10_12/__IPHONE_10_0), but not have clock_gettime() (because _DARWIN_FEATURE_CLOCK_GETTIME isn't set).
When defining a shim for clock_gettime(), don't rely on Apple's clock_gettime() declaration. Instead, shadow Apple's declaration with our own. This prevents folly from inheriting Apple's availability and visibility attributes for clock_gettime().
Reviewed By: yfeldblum
Differential Revision:
D5312574
fbshipit-source-id:
f16634ce92ee6c299613d3db22f0537bd31ac14d