Support case-insensitive search

If only lower-case characters are entered in the search field, use a
case-insensitive search. If there are any upper-case characters, use a
simple case-sensitive search.