Handle UTF-16 encoded text subtitle files.  Refs #9836

The code imported from xine that parses external text subtitle files
(e.g. .srt files) uses a great number of sscanf() calls, which doesn't
work with UTF-16 character arrays, nor any other encoding that
includes NUL characters or expands/obfuscates ASCII characters.

Instead of modifying the parser code, we convert the original file
contents to UTF-8 (auto-detecting the original encoding where
possible), send it to the xine code for parsing, and then convert the
individual subtitle strings back to unicode for presentation.

This is adapted from a patch written by Mark Kendall.
(cherry picked from commit 73c9c55bc202c01d2b6c2172a00293a475672830)