Keep affinity of threadpool threads the same as the main thread on entry
Keep affinity of threadpool threads the same as the main thread on entry, regardless of later changes to the main thread.
This makes sure that we don't pin the threadpool threads to one CPU when the engine_pin()
function is in effect.
Fixes #846 (closed)