maint: Change the return type of xml.match; add xml.gmatch

* dietncl/xmlsugar.lua (match): Update function to return the matched
elements themselves instead of an array of elements.  Moreover, fix the
semantics of 'attribute' and 'value'.  Now xml.match searches for an
attribute with the given 'value' if 'attribute' is nil.
(gmatch): New function; returns an iterator for the matched elements.
* dietncl/filter/import.lua: Updated accordingly.
* tests/test-xmlsugar-match.lua: Likewise.
* tests/test-filter-import.lua: Likewise.
* tests/test-xmlsugar-gmatch.lua: New test; check xmlsugar.gmatch.
* Makefile: Updated accordingly.