remarkable: fix button-listen when resuming from suspend (#1145)
remarkable: fix button-listen when resuming from suspend (#1145)

When the home button is used to wake the device from suspend the evdev
events have surprising time stamps. There is a pair of press & release
events, but the press has a timestamp from when the device went into
suspend and the release has a timestamp from after. This means that the
wake keypress will launch koreader as button-listen thinks the key was
held down for the whole time the device was suspended!

Instead, just record CLOCK_BOOTTIME timestamps for the events and use
those instead of the event timestamps. CLOCK_BOOTTIME is monotonic but
includes time spend in suspend.

Also keep track of whether button-listen saw a key press before each key
release. Probably not strictly required but seemed sensible to add.
koreader/koreader-base,koreader/koreader-base,koreader/koreader-base,NiLuJe/koreader-base,NiLuJe/koreader-base,NiLuJe/koreader-base,koreader/koreader-base,Frenzie/koreader-base,Frenzie/koreader-base,Frenzie/koreader-base,NiLuJe/koreader-base,Frenzie/koreader-base