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.