Always store cache in test/apicache for tests

The API caching under the test framework stores
data in tests/apicache when the Request was uncached
in normal operation, and in <base_dir>/apicache if the
request is processed by CachedRequest in normal operation.

This change forces all cached API requests to be stored
in tests/apicache, irrespective of how the test was invoked,
or whether the request would normally be cached or not.

CachedRequest methods _get_cache_dir and _make_dir converted
to static methods for easy monkey-patching, and docstrings added.

Change-Id: Ibc7ec0a90a130fb1c834fd632af7872f1325b3e0
Merge "Always store cache in test/apicache for tests"