In a few cases the $.each was doing something imperatively that was
terser and easier to understand by using a different Underscore method,
so a few of these I rewrote.
Some code was using the fact that jQuery sets `this` in the callback to
be the item; I rewrote those to use an explicit parameter.
Some code was using $(some selector).each(callback). I converted these
to _.each($(some selector), callback).
One function, ui.process_condensing, was written to be a jQuery $.each
callback despite being in a totally different module from code using it.
I noticed this and updated the function's args.
(imported from commit bf5922a35f257c168cc09ec1d077415d6ef19a03)
Extract some local variables to set up the next refactoring, where
we can parameterize the function.
(imported from commit 1c2801131c19a54713a0d5c2cc26c419412339b0)
The option caused some race conditions on Firefox, and it is
really made moot by the naturalSearch option anyway.
(imported from commit dc7080c905ced9b2f4ad4275d82549acf09a59f7)
This covers most of the module's functionality, with special
emphasis on lines that use underscore.js (_.each and _.filter).
(imported from commit 074181a0273286a258504be634bdd1cead2eecd5)