Implement Drop on XMLWriter

Also tweak XMLWriter.close() to return the wrapped writer, and flush in
XMLWriter.drop() and in write_items().