Merge pull request #44 from gwicke/master

Performance: Parse attribute values in bulk
A small improvement to attribute value parsing performance.

Use `getMatchingChars` when parsing unquoted attribute values.
Fix CR handling in optimized attribute handling.

The `scanChars` function preprocesses \r to \n.  When we use the optimized
attribute handling regexp we are bypassing this conversion, so be careful.
Our regexps can't include \r, and don't try to start matching when we're
pointing at a \n, since it could be a \r in disguise.
Performance: parse tag names in bulk.

Use the same technique as in 18128ee7779f4f13db61cf0171fe2404022aff08
to parse tag names.  The performance improvement is likely to due the
fact that we can reuse substrings of the original source string instead
of creating new strings for each tag name.
Clean up `addAttribute` after bulk attribute value parsing patch.
Fix the SIMPLETAG and SIMPLEATTR special cases in the parse; add test cases.

The SIMPLETAG and SIMPLEATTR special-cases were broken (the regexps
would never match) when the code was rewritten not to use the sticky
tag (regex "y" flag) which is in Firefox and ES6 but not yet in other
JS engines.  Rewrite these regular expressions so that they don't
require the sticky flag.

Add a test case which exercises the SIMPLEATTR handling as well as testing
the \r issues fixed in the previous few patches.
Performance: optimize attribute name parsing.

Use the regex technique to improve the speed of addAttribute by removing
calls to buf2str and parsing with aggressive regex lookahead.
Fix Element.isHTML; support non-HTML elements.

The Element#isHTML property was read-only and the overwrite in the
constructor was silently ignored.  Make the property writable so that
it can be set to false for non-HTML elements.

Closes #41.

Amended-by: C. Scott Ananian <cscott@cscott.net>
Release domino 1.0.16.
Bump version in package.json.
Fix breakage from 400b989d

Make sure to check whether lastIndex changed, and don't match anything in
SIMPLETAG / SIMPLEATTR.

This broke Parsoid parser tests, but was not caught by the domino test suite.
This suggests a gap in test coverage.

TODO:
Add tests for this, or use a bigger HTML5 parser test suite.