Implement PreserveEntities option.

Ported from https://github.com/w3c/tidy-html5
Merge pull request #2 from WCWedin/master

Implement PreserveEntities option.