Improve dom xml gereration

This patch adds a new class XMLElem, which allows to create a XML element
and set its attributes and text node with one call. Also it can add
a child element with the attibutes of child. Then dom xml generation
code can just focus on getting attributes from vm's defintion. It also
make it easier to replace minidom with elementtree if neccessary in future.

Change-Id: Ib936740fcbeeee551e13abfed7fd91f2a159e351
Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/10054
Reviewed-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>