Add functions detailing how to compute num_owned_elements from a dim_dict

The old `num_owned_elements` was broken, and a simple fix would have meant it only worked for block-distributed arrays.  Here I add functions for all dist_types, some pulled from distarray, and also add tests.