win32: fix missing return to case WM_CHAR

Add missing return to case WM_CHAR.

Add a cast from WPARAM to unsigned int to silence warning.
win32: clean up event handling

Return correct values from event event handler.

Remove duplicated some duplicated event handling code.
win32: refactor TrackMouseEvent logic

Refactor the logic behind MOUSE_ENTER/LEAVE events. Query
TrackMouseEvent state instead of storing a flag of the mouse
inside/outside status.