Add xhrInterceptor utility

Some features would benefit from being able to listen to calls made by
the Community Console client to the API. This way, the extension
wouldn't need to make additional calls to the API, since it can directly
get all the information from the current view via the xhrInterceptor.

This change adds a script which is injected into the Community Console
and acts as the interceptor. The src/common/xhrInterceptors.json5 file
defines which calls should be intercepted, and which data (the request
body or the response body) should be retrieved, and when the
xhrInterceptor finds that an API call matches one of those definitions,
it dispatches an event with the name defined in the json5 file and the
prefix "TWPT_". Then, content scripts can listen for these events in
order to work with the data provided in the event details.

Bug: 6
Change-Id: Iea4aeb1f9db84f2c013d82ec4155c59617b8f9f0
diff --git a/src/common/xhrInterceptors.json5 b/src/common/xhrInterceptors.json5
new file mode 100644
index 0000000..158edb9
--- /dev/null
+++ b/src/common/xhrInterceptors.json5
@@ -0,0 +1,9 @@
+  interceptors: [
+    /*{
+      eventName: "ViewThreadResponse",
+      urlRegex: "api/ViewThread",
+      intercepts: "response",
+    },*/ // Example
+  ],