Add utility directory

This adds a new utility directory and moves some of the utility
functions and classes (e.g. dim(), extents, wait_list) there.