font: use a set for finding rules that match the first glyph

This improves neatroff's performance when using fonts with more than
20k rules by more than 350%.