Fix old-style class, basestring, and bad call.

Change old-style class for multilevel.  Redo solver call to check for
hasattr.  Change basestring to str for py3.
Convert print to python3 functionality
Add revisions to swig.

Taken from scipy
8a1a7b23c85f2a6e96e744cc14525d9d7972784d