store: Introduced the concept of query filters.

A filter may be used to preselect objects when evaluating a query. Any object
that's used during the evaluation of a matcher will be compared against the
filter. Only matching objects will be considered further.
store: Make matchers more generic and applicable to non-hosts as well.

Most of the matchers are actually not specific to hosts and may be re-used for
different purposes (e.g. filters). Make them applicable to arbitrary object
types (again) and only check for the right object type when actually needed.

Added simple unit-tests covering filters applied to all types of objects.