Only run memcached tests if server is available.

Fixes #6074 partially