TRQ-2547. Fix a valgrind issue with id_map's destructor.

Destructors are called on global objects once the main thread exits, causing invalid reads
and potentially crashes for threads that are still finishing work at that point. Now the
destructor does nothing to prevent problems.
Update a comment.