Guard against accidental usage of jQuery objects in UI.insert
Improve error when passing a jQuery object to UI.insert

Also add a test for this behavior
Even better checks for the arguments to UI.insert
Make <a> tags SVG elements when they have `xlink:href`.

Fixes #2178.