perf(annotations): increased performance of elgg_get_entities_from_annotations

The default behaviour of elgg_get_entities_from_annotations was
different from all other elgg_get_entities_from* functions.
Also there as a performance issue on large databases

Fixes #6638

Todo:

- [ ] rst docs for how to achieve the old behavior
- [ ] add test for this specific case
- [ ] resubmit to 1.x branch