Refactor `Distarray.from_localarrays`

Partially addresses #337.

1. Refactor `from_localarrays` to optionally take `Distribution` and `dtype` arguments, allowing it to avoid pulling information from the engines.
2. Fix a bug and an API irregularity in `Distribution.from_shape`, and add a type check in `metadata_utils.make_grid_shape`.
3. Change existing calls to pass a `Distribution` when possible: `ones`, `zeros`, `empty`, the `Random` module.  A few functions that take a `dim_data_per_rank` remain, to be addressed in a future PR.(`Distribution.from_dim_data_per_rank` doesn't seem to handle the 'n' `dist_type` properly).

This PR does not yet change the API of any client-side array-creation functions to take a `Distribution`.