Move some hg utility functions out of shed_util_common and into hg_util.