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>
Good catch. Will fix that in the next PR.