Fix tests when using a remote cluster

In these changes, in `test_distributed_io.py`, I

1. remove the assumption that the client shares a filesystem with the engines (I still assume all the engines share a filesystem),
2. make liberal use of the new `Context.apply` function, and
3. speed up the tests by using `fromarray` and `{setUp,tearDown}Class` where possible.

Also, in `test_functions.py`, I change `assert_array_equal` to `assert_allclose`.  I assume `assert_array_equal` was failing due to comparing numpy-generated arrays on OSX to those generated on Linux.

After these changes, all tests pass for me with a client on my laptop and an IPython.parallel cluster on a remote machine.