[qmf] Fields which are matched case-insensitive should sort similarly

Text fields that are matched with case-insensitive matching should also be sorted with case-insensitive collation.

Also includes fix to extend case insensitivity to matching for mail thread keys.