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.
`return block_cyclic_size(dim_data)` ?

Test case for this one, too.