fix #6540: IOBuffer(s) only for ByteString, utf16(s) for binary data, and add is_valid_utf16(s)
check for BOM in UTF-16 conversion of byte arrays
Merge pull request #6546 from stevengj/utf16_data

fix #6540: utf16(s) for binary data, etc.