hash, mgetgroups: drop xalloc dependency