tokenizer: improved doctype parsing

EOF handling isn't complete yet, everything else should be implemented
tokenizer: implemented EOF handling for DOCTYPEs
parser: removed unused properties
parser: implement doctypes, emit ondoctype

with a boolean argument -.-
support ondoctype callback with 4 arguments
test: updated for new ondoctype callback
test: added test for doctypes