Use hmac to sign events in InputDispatcher

InputDispatcher will now be able to sign events. Add two static methods
to InputDispatcher class, for signing events, and for checking the event
signature.

The new methods can verify whether a MotionEntry object was actually created by
the Input system and whether the MotionEntry object was modified
afterwards.

Bug: 134977432
Test: none

Change-Id: Ica11bccd0c3fb065b02634bd236ae5a46f6b19ee
6 files changed