On Linux, close the uinput device on program exit. (dm)
releaseAllKeys() should only be called when the uinput device is actually being closed. (dm)