Add a generic component export macro

Adds base/component_export.h with a parameterized COMPONENT_EXPORT macro
to be used in place of traditional custom export headers and
definitions.

Originally discussed on https://goo.gl/bHPA4U

Usage is straightforward:

C++ header:

  #include "base/component_export.h"

  class COMPONENT_EXPORT(MY_COMPONENT) MyClass {};

GN component target:

  component("my_component") {
    sources = [ ... ]
    defines = [ "IS_MY_COMPONENT_IMPL" ]
  }

This CL also uses the new header to replace the custom //ipc
export header as a minimal proof-of-concept.

Bug: None
Test: ipc-dependent targets compile & link in component and non-component builds
Change-Id: I4189c6456d2c61944e6c704660ab52b5f4def984
Reviewed-on: https://chromium-review.googlesource.com/876884
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#531136}
diff --git a/ipc/BUILD.gn b/ipc/BUILD.gn
index 3d020c5..92aa172a 100644
--- a/ipc/BUILD.gn
+++ b/ipc/BUILD.gn
@@ -36,7 +36,6 @@
     "ipc_channel_proxy.h",
     "ipc_channel_reader.cc",
     "ipc_channel_reader.h",
-    "ipc_export.h",
     "ipc_listener.h",
     "ipc_logging.cc",
     "ipc_logging.h",
@@ -80,7 +79,7 @@
     ]
   }
 
-  defines = [ "IPC_IMPLEMENTATION" ]
+  defines = [ "IS_IPC_IMPL" ]
 
   public_deps = [
     ":ipc_features",