pkg/wait: move wait to pkg/wait