Improve X11 keyboard emulation.

Make sure every key event time is different than the previous one, to
avoid some applications thinking its an auto-repeat.
Merge pull request #112 from benoit-pierre/fix-jumbled-output

Improve X11 keyboard emulation.