input: Create EventQeueue.

This commit mostly shuffles code from GP_Event
to GP_EventQueue in preparation for per window
input queue.
core: Add GP_ARRAY_SIZE() to GP_Common.c
input: X11: Load some KeyCodes dynamically.

The X11 KeyCodes are not carved into the
stone. As a matter of fact some of the
keys are mapped differently on my iBook.

Now we load part of the translation table
dynamically based on X keysyms.