Various changes for wxGTK

The commit message speak for themselves. I'll note some things they don't mention. 

I remove the XErrorHandler. I've experienced both the default and non-default. The current one did about the same as the default one except it had a different beginning (current one started with "GLX error" instead of "[xcb]"). I was able to generate it this while testing out messing with XInitThreads. 

Biggest change is a fix for some Linux users where the program will pass a bad window to GLX. A temporary solution has been put into place (which might be the permanent solution if I can't figure out what causes it or if it's meant to be that way).

For other changes, please view the commit messages and code comments.