Random array creation takes distribution

Modify client-side random functions to take a distribution.

I modified all of these functions to take a distribution as a required argument, whereas before, some of them could be called without `shape`/`dist`/`grid_shape` parameters to return a single scalar.  This didn't seem to be an important use-case (one could just use the appropriate numpy function for that), so I omitted it.

Based on PR #359.