Replace `isinstance` of basestring with str
Replace `isinstance` of basestring with str

The built-in abstract type `basestring` is not in Python 3.
An announcement about this is in the "What's New" section of the
Python documentation,
https://docs.python.org/3.5/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit

In the Python 2.7 standard library documentation,
`isinstance(obj, basestring)` is described to be equivalent to
`isinstance(obj, (str, unicode))` [1]. From my understanding of
tulip.spec.ast, `str` type-checking is a sufficient replacement in the
several places where `basestring` type-checking is performed. If later
evidence shows otherwise, we can add a wrapper that also checks for
`unicode` type in Python 2.7 and no-op otherwise (Python 3).

[1] https://docs.python.org/2.7/library/functions.html#basestring

This changeset is part of a sequence that transitions TuLiP to Python 3
while maintaining support for Python 2.7.

tulip-control/tulip-control,tulip-control/tulip-control,tulip-control/tulip-control,tulip-control/tulip-control