Refactor EventHubTests to use UinputDevice

EventHubTests uses uinput to emulate input devices. We refactor the
system calls into a untility file UinputDevice.h so it can be reused for
other integration tests.

Test: atest inputflinger_tests
Change-Id: If6b1b94b14c0bc71193cbc69ce1239a01990559b
diff --git a/services/inputflinger/tests/Android.bp b/services/inputflinger/tests/Android.bp
index 09ecb13..f913d82 100644
--- a/services/inputflinger/tests/Android.bp
+++ b/services/inputflinger/tests/Android.bp
@@ -10,6 +10,7 @@
         "InputClassifierConverter_test.cpp",
         "InputDispatcher_test.cpp",
         "InputReader_test.cpp",
+        "UinputDevice.cpp",
     ],
     cflags: [
         "-Wall",