Annotation search: fix AND/OR logic when multiple annotations are used

This commit makes sure that all annotations that are queried for are
ANDed while the annotation itself is ORed with its sub-annotations (if
they are requested). This didn't work before, because a valid result
only had to be annotated by one of the annotations. This is clearly
wrong and was noted in issue #700.

For some parts, Django indeed has a strange syntax to build complexer
SQL queries.