web interface: minor cleanup and performance tweak
web interface: make "haspatch" filter faster, reorder filters for faster evaluation.
web interface: assorted helper cleanups
web interface: make "haspatch" filter significantly faster by reducing the number of SQL queries