Relying on m_clear_in_progress is dangerous for modifying m_map. It's
entirely possible for one thread to invoke TypeSystemMap::Clear(), lock
the mutex, and copy the map for finalization while another thread tries
to add a new type system. This could end up in a situation where a type
system isn't finalized because of unsynchronized access.
I propose we remove the m_clear_in_progress variable entirely and rely
on the mutex.