chore(cache): Add some nice new internal APIs for caching

This *greatly* simplifies caching logic, especially for memcache-related code. See Datalist.php for the example in this PR.
Please make memcached switchable to redis/apc/other if possible.