fixed the bug of '\0' in the hash string

Sorry for my last bad pull request. There is a bug with it. The ngx_snprintf() does not add the '\0' to the end of string. It breaks the compatibility with php-memcache.