Allow cache xcache tests to run under cli SAPI.

We test the caching/storage features of xache here to the opcode features. Opcode features are only available when running in web context.
Adapt xcache tests.
fix tests xcache