basic/util.[ch] is a grab-bag of unrelated functions. Let's move a few of the remaning functions to better locations.