CA-268761: Trailing whitespaces are lost by the xapi database
CA-268761: Trailing whitespaces are lost by the xapi database

This is an issue in how xapi serialises the fields in the database xml dump.
Xapi creates row tags that have all the fields set as attributes and
by spec spaces in attrributes are stripped and normalised.
Currently xapi uses an internal encoding/decoding that escapse the
character that would otherwise be stripped, with the possible
exception of one space at the beginnin of the content and one
at the end.

This PR changes this escape mechanism by escaping all white spaces
singularly instead of in pairs. The unescape mechanism is
kept backward compatible.

Signed-off-by: Marcello Seri <34fd14c67154e888f6587d5c0e7eadd13aaf7ca7@citrix.com>

srowe/xen-api,srowe/xen-api,srowe/xen-api,srowe/xen-api,srowe/xen-api