Fix a couple compiler errors with stubs, replace needed include. Further thread_pool implementation. Tighten opengl command thread control.
Silly bug causes deadlock in thread_pool shutdown.