Split InputFlinger into multiple libraries

This is the InputFlinger FE/BE split as detailed in
go/arc++inputflinger-split.

We split libinputflinger into the following dynamic libraries:
- libinputflinger: Acts as the frontend for inputflinger and implements
      InputDispatcher and InputManager.
- libinputreader: Acts as the backend for inputflinger and impliements
      InputReader and EventHub, and adds a InputReaderFactory to create
      the InputReader.
- libinputflinger_base: Contains the common logic that is shared
      throughout InputFlinger, and contains the definitions for
      InputReaderInterface (in InputReaderBase.h) and
      InputListenerInterface (in InputListener.h).

Bug: 119264687
Test: manual: Build, run, and test input (touch, mouse)
Change-Id: I8567635f48de58ee8e5bdb0f8a17a73ea6fa37ef
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index 40ca6a7..388423c 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -19,6 +19,7 @@
 //#define LOG_NDEBUG 0
 
 #include "InputManager.h"
+#include "InputReaderFactory.h"
 
 #include <log/log.h>
 #include <unordered_map>
@@ -26,19 +27,10 @@
 namespace android {
 
 InputManager::InputManager(
-        const sp<EventHubInterface>& eventHub,
         const sp<InputReaderPolicyInterface>& readerPolicy,
         const sp<InputDispatcherPolicyInterface>& dispatcherPolicy) {
     mDispatcher = new InputDispatcher(dispatcherPolicy);
-    mReader = new InputReader(eventHub, readerPolicy, mDispatcher);
-    initialize();
-}
-
-InputManager::InputManager(
-        const sp<InputReaderInterface>& reader,
-        const sp<InputDispatcherInterface>& dispatcher) :
-        mReader(reader),
-        mDispatcher(dispatcher) {
+    mReader = createInputReader(readerPolicy, mDispatcher);
     initialize();
 }