Refactor of NDB_Menu_Filter setupFilters

This rewrites the NDB_Menu_Filter setupFilters function in a way that is more maintainable, by turning it from one monolithic function that does many things to smaller functions with unit tests for setting up filters, resetting filters, setting sort order, etc.

This rewrite has the added bonus of getting rid of an inexplicable eval() call in the code.