Fixes #8743 - Repo Index returns promoted repos

Updated repo index call to return repositories belonging to paticular env and content view combination. This code would work for non library envs previously .. Look at http://projects.theforeman.org/issues/8743 for more info.

This would technically be better as it would only execute one SQL query:

```ruby
version = ContentViewVersion.in_environment(params[:environment_id]).where(:content_view_id => params[:content_view_id])
repositories = repositories.where(:content_view_version_id => version)
```

Here's the single query:

```
"SELECT "katello_repositories".* FROM "katello_repositories"  WHERE "katello_repositories"."content_view_version_id" IN (SELECT "katello_content_view_versions"."id" FROM "katello_content_view_versions" INNER JOIN "katello_content_view_environments" ON "katello_content_view_environments"."content_view_version_id" = "katello_content_view_versions"."id" WHERE "katello_content_view_environments"."environment_id" = 1 AND "katello_content_view_versions"."content_view_id" = 1 ORDER BY katello_content_view_environments.environment_id) ORDER BY katello_repositories.name ASC"
```