Support `from __future__ import unicode_literals`

Using PLY with Python 2.X with `from __future__ import unicode_literals` will currently fail due to a few uses of `isinstance(-, str)`. This makes it hard to have a project using PLY that supports both Python 2 and Python 3.

With this small patch, all tests still pass, and `unicode_literals` is supported.