optimise str == unicode / unicode == str in Py2
optimise x == basestring / basestring == x
add str comparison fallback to Py2 version of unicode comparison