IE & relatedTarget again

PR #401 was not complete. My intention was to set the relatedTarget
to null if we run into one of these invalid relatedTargets.
Merge pull request #404 from arv/related-target-work-around

IE & relatedTarget again
document.registerElement option argument should be optional

Fixes #406
Merge pull request #407 from arv/register-element-optional

document.registerElement option argument should be optional
Events: Fix issue where we ignored null relatedTargets

We set the relatedTarget to null in a few cases to work around bugs
in IE, but we ignored null due to the falsey check in the getter.
Allow compareDocumentPosition to take a raw Node

jQueryUI uses `element.compareDocumentPosition(document.body)` so
we need to allow a non wrapper as the argument here.

Fixes #410
Merge pull request #410 from arv/related-target-fix-null

Events: Fix issue where we ignored null relatedTargets
Merge pull request #411 from arv/compare-document-position

Allow compareDocumentPosition to take a raw Node
Rethrow erors in events

Instead of manually calling window.onerror, rethrow the first error
at the end of the dispatch. This way window.onerror gets all the
expected arguments which is important for error reporters.

Fixes #408
fixed hasEval in case of Chrome Apps
Merge pull request #414 from dinhviethoa/chrome-apps-csp

fixed hasEval in case of Chrome Apps
Minor tweaks to reuse objects and skip forEach during boot

Reuse the descriptor objects where possible. For non generational
GC this reduces the GC churn.

Use c-style for loops instead of forEach since forEach is slow
Merge pull request #413 from arv/error-in-events

Rethrow erors in events
Make the window.onerror test more resilient to old browsers

Check the number of arguments passed to window.onerror before
asserting the value of the argument.
Make sure we use the wrapper NodeList in querySelector.js
Merge pull request #416 from arv/fix-window-onerror-test

Make the window.onerror test more resilient to old browsers
Merge pull request #415 from arv/random-minor-things

Minor tweaks to reuse objects and skip forEach during boot
Merge pull request #418 from arv/node-list

Make sure we use the wrapper NodeList in querySelector.js
Fix getElementsByTagName to handle colon and more

Instead of relying on CSS selectors, this now implements the
matching as described by dom.spec.whatwg.org

Fixes https://github.com/Polymer/polymer/issues/468
Merge pull request #419 from arv/get-elements-by-tag-name

Fix getElementsByTagName to handle colon and more