Added Cache tests using APC and Memcached engines.
Added `DOMAIN` constant definition to `tests/custom_loader.php` which is used for tests.