Fixes issue #416

Checks array dtypes before reducing, and if reducing a boolean array,
coerces to MPI-friendly dtypes accordingly.  Affects `min`, `max`, and
`sum`.
I bet `assert_array_equal` from `numpy.testing` would be faster here.