Move uid and DISTARRAY_BASE_NAME to utils.
Add `apply` function which is analogous to IPython.parallel's apply.
Tests for new apply function.