NF: add nibabel 2to3 build_py command to setup

build_py should now run 2to3 on code and doctests, and ``python setup.py
install`` will in due course work on python 3.
RF: make setup.py files compatible with python 3

There were print statements and other small things to fix.
RF: stop setup.py importing from nipy tree

It was importing from the nipy tree to see if we had data packages
installed.  The data routines since moved to nibabel, so it's more or
less as easy to check directly in the setup.py.  This also means we
don't have to import from the code tree before extensions are built, or
2to3 processing has been done.
RF: add tests to setup.pys as subpackages

Adding the tests as code means that build_py can find the code for
Python 2to3 processing. Tests were previously data.  This was because of
our previous habit of omitting __init__.py files for test directories.
BF: add test data back to setup files

We were previously catching the data because we were coding the
directories as data directories. We now need to make the test
directories subpackages for 2to3 code conversion, and so specify the
data files directly.
RF: make relative imports explicit

Explicit relative imports needed for Python 3 compatibility
RF: specify import names explicitly for Python 2.5

Python 2.5 does not allow 'from .module import *'; specify imported
names in nipy/labs/bindings init.
RF: remove / replace imports lost in Python 3

string.join and fpformats removed in Python 3
RF: small code cleanups towards Python 3

Removing some backticks for repr and an old style Exception "message"
syntax.
RF: remove debugging print statement
RF: clean up whitespace in displacement_field.py

There was a tab in there!  Python 2to3 complained.
RF: make formulae test for ascii letters / digits

It was using string.lowercase, string.uppercase.  These don't exist in
Python3.  Insist (for the moment) on ascii. If someone has need of
non-ascii names, we can revisit.
RF: make doc build compatible with Python 3

The doc building utilities need to work with Python 2 and Python 3.
RF: replace use of file() with open()

This because ``file()`` was removed in Python 3
RF: use numpy max intp instead of sys.maxint

sys.maxint does not exist in Python 3 because of the change in integer
behavior.  We need intp rather than - say - long, because numpy random
in Python 2 at least seems to need things that can be converted to
Python ints.
NF: add to_str compatibility function for python 3

In formula, for instance, we want to convert byte strings to strings in
making formula names.  nibabel.py3k.asstr works for byte strings, but
not for other things that can be converted to strings, like ints.
BF: allow Factors to deal with byte strings

Byte strings often occur as numpy 'S' fields.  Strings often occur as
unicode instead of 'S' numpy types   Strings can also appear as object
dtypes.  Treat all these cases as strings in python 3 and python 2.
RF: remove yields from Python 3 failing test

Yields making it difficult to debug.
NF: allow 'S' dtype for factor columns in formulae

Python 3 compares 'S' and 'U' array dtypes False, following the behavior
of str and bytes comparison.  Convert bytes level specifications to str
on the fly to allow recarrays to have byte field for factor level
columns.
RF: allow byte strings as levels imput to Factors

Byte strings often come up as 'S' fields in recarrays.