Fix loadLibrarySystem on Linux & OS X.
Add support for -XstartOnFirstThread on OS X

The presence of XstartOnFirstThread is detected automatically via the
JAVA_STARTED_ON_FIRST_THREAD_<pid> environment variable. This is now
the default for LWJGL demos, so CGL context locks have been removed.
Merge remote-tracking branch 'upstream/master' into travis-linux-x86