move cache_hash to a module

As we could have different implementations of `memcache_hash` method, we should have it in a isolate module with the requires and all.
Also have the isolate unit test for it.

review @camilo @hornairs