use local definition of hash_map to enable compilation using dense_hash_map

Except for the quirk that we need to have a separate string_hash_map type, this
allows quickly switching the hash map type (e.g. from sparse to dense).