Flushing a pending batch of requested events is blocking for several
causes. The readEvents API call wasn't properly returning the state
of the pendings, and even after that's corrected we were still blocking
on the input reader _after_ filling out the pending requests.
While we're at it, follow the CDD recommendation synchronize with
SystemClock.elapsedRealtimeNano() clock. Replace the monotonic time
with boot time as reference time.
Fixes android.hardware.cts.SensorTest#testBatchAndFlush, addresses
CRACKLING-641
Change-Id: Iae460f503e1ad408a0cb7855000daabec414a459