Optimize _PyUnicode_AsKind() for UCS1->UCS4 and UCS2->UCS4

 * Ensure that the input string is ready
 * Raise a ValueError instead of of a fatal error
1 file changed