Refactor LocalArray creation

Push control of comm objects down into the `distarray.local.maps.Distribution` class, and refactor `LocalArray` creation functions to take `Distribution` objects.

Distribution objects can be created with
* `__init__`, which takes a `dim_data` or
* `from_shape` which takes the old set of parameters.

LocalArrays can currently *only* be created with Distribution objects (or objects that have a `__distarray__` method).

This PR also consolidates some utility functions into `metadata_utils`.

This required lots of changes to code and tests in the `local` directory and to client-side code that created `LocalArrays`.

Also, add a couple of tests for untested `localarray` functions and pull some testing functions into `testing.py`.