Add C macro for hash table iteration
This removes some boilerplate code and further reduces dependencies on
hash table implementation internals.
* src/lisp.h (DOHASH): New.
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/composite.c (composition_gstring_cache_clear_font):
* src/emacs-module.c (module_global_reference_p):
* src/fns.c (Fmaphash):
* src/json.c (lisp_to_json_nonscalar_1):
* src/minibuf.c (Ftest_completion):
* src/print.c (print):
Use it instead of a hand-written loop.
(cherry picked from commit
fec87a4b36a67688932e7bb7e1720bd2c4363a61)