Made snapshot_nodes_by_block_id_ an std::map.
Use a boost::ptr_map to make code compile on old GCCs
Fix a leak/crash issue.
Merge branch 'daniel_2213' into next