Class based filtering

This changes our filtering mechanism to use JQuery selectors to set jobs, groups and platforms vislble or not.

This also contains some refactoring to make some functions more reusable and prevent circular references in our classes.