move pdftohtml code to module
minor cleanup for pdf2htmlEX