Fix `Distribution.from_dim_data_per_rank`

1. Add a function to fill in missing `dim_dict` keys for the 'n' `dist_type`.
2. Make a `Distribution` from a `dim_data_per_rank` before calling `DistArray.from_localarrays` to avoid communication (in functions that require it)

Based on #353.

Further addresses #337.