Move UTF16_IS_SURROGATE to regenc.h

Also remove duplicated definitions.
Merge branch 'ruby-2.x' into ruby-2.x-buildenv