UTF-8 strings are correctly encoded

Added XML_CHAR_ENCODING_UTF8 to parser context.
Tidied up parser context freeing.