maint: Add xmlsugar.replace; update xmlsugar.remove prototype

* dietncl/xmlsugar.lua (replace): New function; replaces a given child
by another element.
(remove): Update prototype; now the function accepts both the position
or the pointer to the element to be removed.
* tests/test-xmlsugar-remove.lua: Updated accordingly.
* tests/test-xmlsugar-replace.lua: New test; check xmlsugar.replace.