Refactor graft element copying into a separate function.

This is so that we can override graft element copying to
enrich it.
Add ChangeTrackingGraftElement, which layers dirty tracking on GraftElement.

This is a step on the way to smarter updating of the DOM.