Reduce memory allocation overhead in update generation code
Reduce memory allocation overhead in update generation code

Note that pugixml library allocates memory for a document in increments
of 32KB pages and then manages smaller allocations (nodes or attributes)
using these pages. Calling the reset method on a document frees all the
pages. Hence a 32B page allocation/free happens for each config message
sent to a client. Instead, removing the only child node of the document
ensures that pugixml does only a single 32KB allocation per document and
recycles the same memory when building the tree for each message.

Change-Id: Id56d5ad6c45fc2b6bedfe402d4758b454efc183e
Partial-Bug: 1602347

nischalsheth/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,nischalsheth/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,nischalsheth/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,nischalsheth/contrail-controller,nischalsheth/contrail-controller