CP-10069: disable read caching if license-restricted

Read caching is disabled if license does not allow it.

VDI.attach_from_config does not contain a XAPI session, because this is
called by HA before XAPI starts. We don't use read caching for static
VDIs because it does not make sense, we only occasionally write data to
such VDIs.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
[squashed commits]
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Felipe Franciosi <felipe.franciosi@citrix.com>

GitHub: closes #229 on xapi-project/sm