Improve filter logic for Department and School sidebar filters

What counts as a "department" differs between students and non-students: the
former store their data in the "Major Program of Study" field, while the latter
store it in the "Department" field. These changes account for both
possibilities when filtering.

The logic is also changed to use regexp matches to convert URL-safe versions of
department names (like 'dental-hygiene') to MySQL versions (like 'Dental
Hygiene'). This helps to ensure that inconsistent spaces/hyphens swaps don't
throw off the filter.

See #999
Remove hyphen from "African American Studies". See #999