Add global threadpool, use it for texture scaling parallelization

Needs merging in my pull request in native first.

Only included in the windows build files.