Fix error reporting for UTF-16 surrogates.
Fix error reporting for UTF-16 surrogates.

UTF-16 surrogates are not allowed in UTF-8.  However, it makes sense
to combine matched surrogates to form a valid single code.

When surrogates are not matched, the situation is tricky.  If a high
surrogate is found but the string terminates we discover whether the
next code is a low surrogate, then it is an early termination error.
If a surrogate is found on its own, then we consider it to be a bad
character.

dgobbi/vtk-dicom,dgobbi/vtk-dicom,dgobbi/vtk-dicom