Reduce the number of roundtrips for DistArray.get_localshapes to zero.

This also adds functions to metadata utils that could be useful for local map construction. But that can wait for another PR.
How does it work in practice, though?  Look at `size_chooser`:

```python
    chooser = {'n': non_dist_size,
               'b': block_size,
               'c': c_or_bc_chooser,
               'u': unstructured_size}
```

The 'b', 'n' and 'u' cases are functions that return a size, but 'c' is a function that returns a function that returns a size, so they can't be compatible.  What am I missing?