Reverting move of lock
Fixed merging_map & test.
Added a future, which fixes sync problem.
Get rid of global future.
Fix problem where future.get() is called after finalize().
Fixes to local::packaged_task