Added propper unicode input handlind

The current keyboard input uses Gdk.EventKey.str to capture the entered keys. While this works fine for the most common use cases, it is not sufficient for advanced input. International keyboard layouts often require multiple key presses to enter a single character. For example, my keyboard layout requires me to enter input combination of ```alt+3```, ```space``` to produce the character ```^```. Other examples include various umlauts or even more complex characters. Hexcode combinations work as well now (```ctrl+shift+U```, followed by a hexcode, followed by ```enter```).

This patch makes limited use of the gtk input methods api to capture the entered input. The patch doesn't fully implement the IM functionality, there is no pre-enter preview and the surrounding text callbacks are not implemented, but it's better than nothing.

To make it work, I had to move the input handling above the user key command handler. This _might_ break something there, so you might want to check that.