Use six.StringIO/BytesIO instead of StringIO.StringIO

to keep Python 3.x compatibility, use six.StringIO/BytesIO to
replace StringIO.StringIO

StringIO works for unicode
BytesIO works for bytes

Change-Id: I0d1f8a55c3bc41379077b46feb81931779b7ad45
Partial-Bug: #1280100
Merge "Use six.StringIO/BytesIO instead of StringIO.StringIO"