base: add cpu_session parameter to thread creation

Fixes #1114
pthread: separate structure and create function

With the commit an application may create a modified version of pthread_create.
Will be used by Virtualbox port.

Issue #1114
vbox: implement pthread_create specifically

Issue #1114