Fix entity, doctype tokenizing, refactor empty tag handling.
Serialize doctype publicId and systemId
Improve foreign content handling
Impove doctype handling
Misc fixes in parser

Added framesetOk flag, upldated special element list, added error on unexpected ent tag in head, fixed endTagFormatting, other fixes and improvements.