RF: refactor tests for setting header dtype

Refactor imports; create new header for each dtype set test; extend
tests to check dtype and swapped dtype; extend tests to check all
supported numerical types for particular header type.
NF: hdr dtype can be str code / int / float

Allow 'set_data_dtype' method of Analyze header types to use string
codes like 'i1', 'f8', and Python types like float and int.
RF: indent dtype test code block

From review by Eric Larson
Merge pull request #257 from nipy/refactor-hdr-dtype

MRG: allow more ways to specify data dtype

A small refactoring to allow this:

    hdr = nib.Nifti1Header()
    hdr.set_data_dtype(float)

and this:

    hdr.set_data_dtype('f8')

Previously these would both raise an error.