This change should make base applet code easier to modify without modifying applets itself. This is also a starting point for implementation of better routing netwm messages to applets without adding specific listener to each applet.
Let panel applet use GLOBALFLAGS. Check for XKBrules from XKB extension and conditionally compile code using it.