Refactor HTML syntax highlighter too keep track of tag nesting

This is needed for the eventual implementation of inline spellcheck
Start work on managing dictionaries in calibre
...
Add ISO 3166 country codes
...
Implement loading of both builtin and user installed dictionaries
...