Use importlib instead of __import__

Without this change, bad things happen on my system when running ``optional_package('sklearn.linear_model')`` (``sklearn`` fails to import from ``..externals``, and then it looks like ``sklearn`` is not installed on my system).

/cc @matthew-brett @arokem 
I suggest to include the backport for the time being. It's quite small: two
functions with a total of less than 40 lines of code.



On Thu, Nov 20, 2014 at 6:15 PM, Matthew Brett <notifications@github.com>
wrote:

> In dipy/utils/optpkg.py:
>
> > @@ -1,5 +1,7 @@
> >  """ Routines to support optional packages """
> >
> > +import importlib
>
> Could do. Or drop Python 2.6 support.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nipy/dipy/pull/471/files#r20693629>.
>