Added Optimisation flags.
Added Macro flag to change between CU pool and threadpool.
Enable thread pool.
Merge branch 'threadpool'