Make case-fold-search more smart.

Signed-off-by: Bao Haojun <baohaojun@gmail.com>