pkg/testutils: utility functions to facilitate writing Go tests

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
beam/inmem: use pkg/testutils