Use six.string_type instead of basestring

This patch replaces basestring with six.string_type.
Let our code don't break in Python3 environment.
See http://pythonhosted.org/six/#six.string_types

Change-Id: Ib0c74b1f2a90dbee9ce56be01ebac51bbe8dc468
Merge "Use six.string_type instead of basestring"