refactor(isArray): use Array.isArray exclusively

IE9 supports Array.isArray so we don't need a polyfill any more.
perf(jqLite): optimize event handler
perf($compile): don't register $destroy callbacks on element-transcluded nodes

This is a major perf win in the large table benchmark (~100ms or 9).

This cleanup is needed only for regular transclusion because only then the DOM hierarchy doesn't match scope hierarchy
(transcluded scope is a child of the parent scope and not a child of the isolate scope)

We should consider refactoring this further for the case of regular transclusion
and consider using scope events instead.
perf(jqLite): simplify jqLiteDealoc

while querySelectorAll is much more expensive than getElementsByTagName on elements with
both many and few children, cloning the live node list returned by getElementsByTagName
makes it as expensive as querySelectorAll (we need to clone because we need the node list
not to change while we iterate over it).

the childNodes and childNodes.length check is as expensive as querySelectorAll on a node
without any children, so it only makes the whole lookup 2x as slow, so I'm removing it.
perF($compile): don't create jq wrapper for linkNode needlesly

when compileNode and linkNode are the same, we can reuse the existing jqLite wrapper.
perf(ngRepeat): simplify code and remove duplicate array.length access

minimal perf gain (~2ms)
chore(ngRepeat): fix typo in a comment
chore(ngRepeat): improve inline comments
refactor(ngRepeat): simplify previousNode boundary calculation

the previousNode was almost always correct except when we added a new block in which case incorrectly
assigned the cloned collection to the variable instead of the end comment node.
refactor($compile): automatically append end comment nodes to all element-transclusion templates

Previously we would do it manually in all of our structural directives.

BREAKING CHANGE: element-transcluded directives now have an extra comment automatically appended to their cloned DOM

This comment is usually needed to keep track the end boundary in the event child directives modify the root node(s).
If not used for this purpose it can be safely ignored.
refactor(jqLite): simplify jqLiteAddNodes when multiple nodes are being added

This branch is not as hot as the single node branch and the slice that we need for old webkit/phantom makes for loop preferable.
perf($parse): speed up fn invocation by optimizing arg collection

8-15% improvement for depending on the number of args
refactor($parse): small readability improvements
perf($parse): speed up fn invocation for no args case
chore($parse): name anonymous functions for better debugging
style($parse): small readability improvements
perf($parse): optimize filter implementation

- generate less garbage
- optimize argument collection
- use call instead of apply for no arg case (2x boost)
fix(Scope): don't clear the phase when an exception is thrown from asyncQueue or watch

If we clear it here, then any other watch or async task could start a new digest.
fix(jqLite): revert the #ready() optimization until jQuery does the same

The change unfortunatelly makes us incompatible with jQuery which always falls back to onLoad.

Not falling back to onLoad is a possible breaking change because if Angular was added to the document during DOMContentLoaded
document.readyState at this point is 'interactive' which we'd need to add to our check, but more importantly if more scripts
are added during DOMContentLoaded these won't be loaded before we bootstrap, which can cause angular modules not to be found
during bootstrap.

This load ordering issues is really just a cornercase that should be handled via manual bootstrap, but until jQuery has the same
behavior we shouldn't do something else.
fix(jqLite): clone wrapNode in jqlite/wrap

Change jqLite's implementation of wrap() to clone the wrapNode before
wrapping the target element in it.
Match jQuery's wrap() behavior and prevent accidentally attaching
target element to the DOM as a side effect.

Closes #3860
Closes #4194