Generalize `from_distarray` to take a dict or an object

This is a simple change to `from_distarray` that I found useful when looking at Distributed IO.  It changes `from_distarray` to take *either* 

1) an object with a `__distarray__()` method that returns a "distbuffer" or 
2) the "distbuffer" dictionary directly.

The original commit is cherry-picked from the `feature/flat-file-io` branch, but I added some tests.