Move modifier tracking and utilities to the soon existing evdev platform
The evdev input platform will require the same tracking logic like the fake input devices, hence this moves the code out of test into src/platforms/evdev.
Approved by Alan Griffiths, PS Jenkins bot.