Better smart-case query-candidate matching

Previously, "Foo" would match "Foo" but not "FOO". Now it matches both. Bottom
line, an uppercase char matches only uppercase chars but lowercase chars can
match either. We used to insist that lowercase chars in the query match
lowercase chars in the candidate strings IF the query also had uppercase
letters; this was dumb and a poor user experience.

Fixes #501.