Fix for issue #310.

Additional query conditions are now added to the main query (in _EloquentStatementRepository::addParameters_) when related_activities is on. This replaces the previous strategy of addressing another query when _related_activities_ is on.

Something similar could be done for _related_agents_, but I didn't dare mess with a parameter I haven't used at all so far.