refs.c: make submodule ref store hashmap generic