Convert ext/memcache to HNI

Part of #1480