Merge pull request #219 from matthew-brett/remove-_write_header

MRG: remove _write_header method

The write_header method in the image classes was only being used to write zero
bytes into a file where the data was not exactly at the end of the header. Use
the seek_tell function for this, and remove the writeheader method from all
classes.
RF: refactor proxy slice testing for generality

I want to use the slice generation for the array proxy tests.
NF+TST: add arbitrary slicing of default array proxy

Plumb in fileslice to do arbitrary slicing of array proxy objects, for
the default array proxy object.

Tests for default ArrayProxy object cover Nifti1+2, Analyze, SPM99+2,
MGH proxy objects.
NF: function to predict output axes after slicing

ECAT proxy slicing needs to know which axis in the output array it is
slicing over, when reading volumes.  Make a function to predict output
axes corresponding to input axes after slicing.
RF: adapt slice generation to lengths of 1

Some images have axis length 1, adapt to this when creating example
slices for given length.
RF: add proxy slicing to ECAT array proxy

Difficult to test well because the example image only contains one
volume.
RF: refactor MINC tests to allow more examples

I'm going to add more example files to test.
TST+BF: add test for single scalefactor in MINC

Fix bug for getting the scalars from NetCDF and HDF5 variables.

Add single-scale datasets for MINC1 and MINC2.
TST: add MINC 4D tests (so 2D scaling tests)

Add MINC 1 and 2 4D files.  This tests 4D load, but also image min / max
scaling for more than one dimension.
NF+TST: add slicing to Minc?File, MINC array proxy

Make Minc1File, Minc2File sliceable using `get_scaled_data`.

Use this to implement array proxy slicing.
TST: add generic array proxy slicing tests

Add smaller array proxy slicing tests to array proxy API checks  The
fuller checks need to go with the individual proxy class tests, because
they are too time-consuming to check for each possible array proxy
instance.
RF: enforce mode='r' for opening HDF5 files

For some reason, the tests were running fine with the default assumption
that h5py.File was ``mode='r'`` by default, when run on their own
(``nosetests nibabel/tests/test_proxy_api.py``) but not when run as part
of the full test suite (``nosetests nibabel``).  Maybe there's a global
flag in the HDF library somewhere that was getting flipped.
NF: add is_proxy utility function

Function to test whether we have a proxy object
NF: ArrayProxy can use C or F array memory layout

Implement and test ability to use C memory layout arrays on disk as well
as Fortran order (we could only do Fortran before).
DOC: update proxy API definition in docstrings

Clean up and update docstrings for ArrayProxy class.