fix memory leak in grn_ctx_recv
avoid double free when call grn_ctx_close
add test
Merge pull request #184 from do-aki/groonga-php

php binding holds some problems of memory

Patch by do_aki. Thanks!!!