RF: refactor nifti1 / analyze + tests for nifti2

Put tests into classes and generalize class names and constants ready
for implementing nifti2.
RF: check for overflow in setting hdr dims

The int64 type can overflow when setting large python integers, rather
than silently rolling to negative.
NF: draft nifti2 support

First pass at Nifti2 support.

Need to add algorithm for testing for presence of nifti2 on loading.
Need example data files.  Need to add check for EOL corruption.
TST: add tests for nifti2 EOL signature

Test nifti2 headers for EOL signature, test the tests.
RF: remove Freesurfer hack for shape in Nifti2

Freesurfer hack is for long vectors.  No need for this with Nifti2
because of the int64 dimensions.
RF: allow extension lengths not multiple of 16

The Connectome project is writing files with extension sizes that do not
divide by 16; allow these but warn.  Test that we are doing this.
DOC: add link to CIFTI format doc

Found the doc defining the CIFTI format.
NF: add nifti1 / nifti2 / analyze detection logic

Use early bytes from file to detect whether this file is nifti1, nifti2,
analyze, or neither.
RF: add nifti2 names to top level namespace
RF: use nifti 1 / 2 detection in save / load

Special-case nifti 1 / 2 pair saving.

Extend tests for single <-> pair conversion.

Allow '.hdr' as extension for saving to pair.
NF: add nifti2 example data files

Nifti2 header and image, both made by me, from the current code, because
I couldn't find any freely available examples.
BF: fix small remaining bugs in nifti2 tests

We were using nifti1 module load for nifti2 tests.

Need to specify nifti2 example file for nifti2 tests.
NF: copy extensions between nifti type headers

Nifti extensions are compatible between types; copy references to them
when converting from one nifti image type to another.
NF: add proposed CIFTI intent codes

From:
http://www.nitrc.org/plugins/mwiki/index.php/cifti:ConnectivityMatrixFileFormats
TST: add Nifti2 to image api tests

Test that Nifti2Pair and Nifti2Image conform to image API.
BF: restore disabled EOL checks

Luckily Yarik spotted it.
DOC: restore emacs comment line

I deleted it by accident somehow.
RF: refactor image type detect into own function

From suggestion by Yarick - move image type detection into it's own
function in case someone wants to use it without loading the image.
Extend tests by testing against the example data.
FIX : fix the read_annot when parcellation has missing values and orig_ids=False.
Vertices with 0 label were randomly merged with the first entry in the colortable
BF: allow for ValueError setting long into int64

See discussion at
https://github.com/nipy/nibabel/pull/191#issuecomment-23382942

Numpy 1.4.1 (maybe others) gives a confusing ValueError for something
like this::

   arr = np.zeros(2, dtype=np.int64)
   arr[0:1] = 2**64 # Python long

Add ValueError as another caught exception type for this case.