[loader] Move typespec_cache to a lock-free-reads hashtable.