Rework filter implementation

Replace the old clumsy and unreadable way of appending to a `$db_cond` variable by a cleaner way to define possible filters and evaluate them based on the actually present filters.

This PR adds a `FilterHelper` class whose `add()` lets the called define possible filters in various, but still readable ways.
In the end, the array of actually present filters is given to `evaluate()`, which compares it to the stored filters and returns a ready-to-use MySQL `WHERE` condition.