perf($compile): only use document fragments and copy data when necessary (replaceWith)

This does a few things, all within the internal `replaceWith`...

* only creates the document fragment if needed and clarifies why it's there
* only copies data if the node `hasData` to avoid creating empty data to copy (a jqLite version of `hasData` was added)
* uses the static data methods to avoid creating jqLite/jQuery objects
* cleans the data of all replaced elements the same way (this will no longer trigger $destroy on nodes 1+, like node 0, which seems correct to me)
* uses jqLite/jQuery/Array.splice to do the array modifications
I think putting the (expected to be) smaller value on the left is easier to read, but I think I'm normally the odd one out on that one. Then expressions such as `1 < a && a < 5` read nicely left to right, and you don't have to remember what `>` means!

But I'll change it when/if this is closer to being merged, along with any other feedback...