Scheduler interface was redesigned. Now the scheduler does not allocate memory itself and provides ability to attach/detach threads. Does not execute threads yet (hope it will in the next commit).