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.
What if `stop` or `start` is `None`?  Is `stop - start` supposed to raise an exception in that case?