base: Add jQuery amends plugin which smoothly amends HTML

This is a version of $("...").html() which syncs over the HTML
and avoids needlessly replacing nodes or elements.