Fix undefined behavior when destroying a search context

Also, change memchr to return const void* to fix compile error on GCC 4.4.7
Merge branch 'master' of github.com:omghaxzs/qgrep