Fixed dead keys in X11

On X11, dead keys on international keyboards were previously more or less ignored when pressed. On Win32, dead keys are really handled like dead keys, meaning pressing the accent key does not create a character but rather modifies the following character (i.E. e becomes é).

With this patch, the library will now try to create an X input context to handle dead keys properly on international keyboards.

This makes it possible to enter for example an é on a German keyboard without further effort and with the same look-and-feel as the user is used to in most other applications.
A fallback mechanism is provided in case the client does not support X input method / context creation.
In that case, the library will behave as it did before.

### Screenshots
Notice the accent over the a's of the character events.

Old:
![image](https://f.cloud.github.com/assets/5623987/1277358/8f8c5bc0-2ebe-11e3-9235-33c14a7b48fb.png)

New:
![image](https://f.cloud.github.com/assets/5623987/1277354/5c622360-2ebe-11e3-808b-c92b11c83ade.png)