wxgui: Allow Linux/X11 apps to be thread-safe

Call XInitThreads as first Xlib call
Merge branch 'maint'