Update parsing algorithm according to current spec

Added null-character handling.
Updated element groups.
Fixed fragment parsing.
Implemented script states of tokenizer.
...and more. Almost all tests now passed.

<!---
@huboard:{"order":29.75}
-->