windows key translation fixes

Turns out that since we are using low level hooks to get the global key
events (since the ioHub is running in a seperate process), then the
Windows functions to get the current keyboard state that is passed into
the ToUnicode function is never updated by Windows.

That was causing 'lots' of issues obviously. Now I maintain the keyboard
state array myself based on the received events. Passing this into
ToUnicode seems to work well.

2 outstanding issues:

1) For some reason CRTL keys are acting as SHIFT keys (some bug in my
code ).
2) When CAPLOCK is on, it does not change the key state., NUMLOCK does
work though.

Other than those 2 issues, looking good for the keyboard in win32.