Make bibref query case-insensitive

See commit messages for more details.

This addresses tobie/specref#22
I was copy-and-pasting expandRefs(). It’s not necessary here though so I removed it in f1b4e8940d2bd325d9a7f564842df85deb7774d6#diff-d41d8cd98f00b204e9800998ecf8427e