Clone input nodes when inserting over a set

This patch increases parity with jQuery, specifically in cases where
manipulation methods are called with existing nodes on sets containing
more than one element. In such cases, the provided node should be cloned
prior to insertion (excepting the final element in the set, where the
original node should be inserted).
Merge pull request #574 from jugglinmike/clone-set

Clone input nodes when inserting over a set