Base for jQuery #13539: more robust Sizzle.attr

Also includes:
* fix and tests for `attrHandle` (broken by the introduction of `setDocument`)
* other extension-hook tests
* miscellaneous style fixes
* miscellaneous size reductions