Consistently implement alternative cache expiration.

All the following BC Breaks are only relavant if you've been relying on
prior unsupported and undocumented functionality.

Closes #1022.

Adding tests.

Refactoring setting of TTL in redis cache adapter.

BC Break: APC adapter would previously would alternatively take
a timestamp as the future expiration time. Passed integers are now
used as the TTL in seconds.

Please update your code accordingly when using the apc cache adapter
in combination with integer expiry.

BC Break: When using an integer expiry with the Memcache adapter it
was passed unmodified to the underlying driver and could be inter-
preted as either a TTL or an absolute timestamp. Passed integers are now
always used as the TTL in seconds.

Please update your code accordingly when using the memache cache adapter
in combination with integer expiry.

Removing unsed.
Refactoring write method in redis cache adapter.
Use transactions in write of redis cache adapter.