Fix for https://github.com/TeamMentor/Master/issues/833 and https://github.com/TeamMentor/Master/issues/870

The #833 fix is a massive hack, and the code is very ugly. That said, it seems to work and there are very few differences between the 'html' and 'article' rendering (if there is one only minor prob with one article (and that is on the code block)

The DoS solution is done by using a temp thread to run the transformation (which is given 2 secs to complete it)