[CA-39743] Improvements to the wait_xen_free_mem function.
[CA-39743] Improvements to the wait_xen_free_mem function.

Improvements include:
* We read the values of free_memory and scrub_memory atomically (rather than separately).
* We exit early if (free_memory < required_memory) and (scrub_memory = 0) as it's unlikely that more will become free.
* We time out more quickly than before (64 seconds rather than 256 seconds).

Signed-off-by: Jonathan Knowles <47466d50a94574c6fb872a0e5feec104dcb68f29@eu.citrix.com>

koushikcgit/xcp-networkd,sharady/xcp-networkd,johnelse/xcp-rrdd,koushikcgit/xcp-networkd,robhoes/squeezed,djs55/xcp-rrdd,djs55/squeezed,koushikcgit/xcp-rrdd,simonjbeaumont/xcp-rrdd,sharady/xcp-networkd,djs55/xcp-rrdd,koushikcgit/xcp-rrdd,simonjbeaumont/xcp-rrdd,koushikcgit/xcp-rrdd,djs55/xcp-networkd,johnelse/xcp-rrdd,djs55/xcp-networkd