Port html sanitizer updates from SnuDown and add test cases

[Snudown's commit](https://github.com/reddit/snudown/commit/62bfa4ad673c4f19683ed91c5ebb093bbe9f581d)