Introduce _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR ABI option.

Currently libc++ compiles a special version of error_category()
into the dylib. This definition is no longer needed, and doesn't
work on Windows due to dllimport/dllexport semantics.

For those reasons this patch introduces an option to
disable/enable this definition. By default the definition
is provided in ABI v1 except on windows. This patch
also addresses D28210.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290840 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/system_error b/include/system_error
index c7e73d4..5804063 100644
--- a/include/system_error
+++ b/include/system_error
@@ -384,7 +384,8 @@
 public:
     virtual ~error_category() _NOEXCEPT;
 
-#ifdef _LIBCPP_BUILDING_SYSTEM_ERROR
+#if defined(_LIBCPP_BUILDING_SYSTEM_ERROR) && \
+    defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR)
     error_category() _NOEXCEPT;
 #else
     _LIBCPP_ALWAYS_INLINE