ts2: Improve the output of processed TS files

 - Pretty-print empty tags without self-closing them
 - Always preserve TS doctype
 - Add a test reusing existing ts data

This bumps the lxml requirement to 2.3.6 due to requiring the doctype argument