Cache templates in Memcached/Redis, not APC

Per #516.