Add a configurable idle timeout to stunnel

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>

Signed-off-by: Akshay <akshay.ramani@citrix.com>
CA-135934: use the same estimate of dom0 'static_max' everywhere

We sample the amount of free pages on a host and add an estimate
of dom0 'static_max' to it to create the boot_free_mem.

Later we substract a different estimate of dom0 'static_max' and
erroneously conclude there is free memory when there isn't.

Note there is no good estimate of dom0 'static_max' because dom0
doesn't really know how much memory it has: the xen command-line
says one thing; the domain_getinfo hypercall says another thing;
the "free" command-line says a 3rd thing; and the balloon driver
says a 4th thing. However the main property we need is that we use
the same estimate everywhere.

Signed-off-by: David Scott <dave.scott@citrix.com>
Merge pull request #1768 from djs55/CA-135934

CA-135934: use the same estimate of dom0 'static_max' everywhere
Our cookie are even more broken than I thought.

Ours have spaces in the values. The newer Stringext cookie extraction
doesn't allow this, unlike the previous cohttp version. So rather than
use stringext, use a hand-rolled parser.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Merge pull request #1767 from jonludlam/fix_migration

Our cookie are even more broken than I thought.
Revert "CA-118466: Prevent snapshot revert from deleting VM VDIs that were attached"
Fixes CA-121278

This reverts commit 6989a08e8244a8c10318940ea65109e2169ff243.

The logic to skip disks attached after the snapshot isn't quite right,
and is causing problems in our test infrastructure by filling the storage
with disks which really should have been removed.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Merge pull request #1775 from euanh/backout-ca118466

Revert "CA-118466: Prevent snapshot revert from deleting VM VDIs that were attached"
Merge pull request #1763 from akshayramani/SCTX-1665.f

Add a configurable idle timeout to stunnel