Fix for astype('S') string truncate issue

Calling astype('S') for an array of string objects results in a string array where dtype='S64', even if the original string objects are longer than 64 characters. Add call to GetParamsFromObject() to determine maximum string object length, and use that as string dtype size.
Add support for unicode strings
Add tests for strings shorter than 64 characters
MAINT: Fix tests for 2to3 and Python < 2.6.

Use asbytes instead of 'b' and the 'u' string prefix instead of sixu.
Merge pull request #3277 from charris/backport-3270

Backport 3270