wlfreerdp: add keyboard and mouse wheel support, fix races

This commit does the following :
- fix the keyboard logic (which now fully works), add
  support for vertical mouse wheel events ;
- make the rendering a bit more efficient ;
- fix some race conditions which could crash wlfreerdp ;
- improve the code style.

Signed-off-by: Manuel Bachmann <tarnyko@tarnyko.net>
Perhaps the magic 0x78 and 0x88 could be replaced by the corresponding define...