base: add cpu_session parameter to thread creation

Fixes #1114