Enable Redis extension for CI and fix tests

This PR enables the redis extension and server in the CI environment and fixes timing-sensitive tests and loose assertions as well as previously not-visible undefined variable issue.

As as merge note: PHP_EXT can hold multiple extensions by separating with spaces i.e. PHP_EXT="memcached redis".