Apps: pre-sort a bit and also break up category trigger and match regexps.

@russellholt @jagtalon @jdorweiler @yegg @bsstoner 

@russellholt something like this could be abstracted into spice -- i'm not sure how yet though.