refactor HTMLEmail class to be more sensible
fix failing test

`TestCase.assertInHTML` only available in django 1.5 and up.