Converted locking to be exception safe, removed pointer semantics where possible, avoid entry look up in maps twice if found
Made locking exception safe, fixed memory leaks,
Merge branch 'apex_integration' of git://github.com/nchaimov/hpx into apex_integration