There is overhead in using std::function. This patch replaces std::function in the TaskManager queue and in the SharedState.
I benchmarked `TestTaskManager::test_Load` it is 1% faster. Its not much. I still think it should be changed because, parallelized work is likely performance critical and some things might not be parallelized becaus "there is to much overhead"
~While working on this diff i noticed std::shared_ptr<SharedState> is used in a non thread save way, when a Future and the according PackagedTask are destroyed at the same time.
Propably we don't nead a SharedState because the Future "outlifs" the PackagedTask.~