fixes #6330 - using pulp & pulp_node features of smart proxy

* to determine the default smart proxy
* to determine whether to show the lifecycle env selection screen
* to determine which proxies to who under the content source selection
Fixes #6967: Add the correct location of mongo, and collect all log files
Fixes #6944/bz1106434 - Fixed Repodiscovery product validation

Added code in the repo discovery page to validate new product.
Previously product errors like blank name invalid label etc would not
show up on the screen. This commit tries to address that.
Refs #6867,BZ1038323 - Show katello-agent status for systems
Fixes #6993: Allow repo-discovery through a proxy.

Note that the Anemone gem allows the passing of proxy_host and proxy_port
by default but does not currently support proxy user and password.
In order to get around this, a monkey patch is applied to anemone
to allow passing user and port.
fixes #6992 - ensure rhel 5 repos can be used by el5 clients

We can not publish the repos prior to syncing as this will cause
pulp to set the checksum on the repos to sha256.  See https://bugzilla.redhat.com/show_bug.cgi?id=1127793
We also need to pull the checksum after sync and add it to the repo
to ensure that clones use the same checksum
Fixes #7059 - enable pagination in subscriptions (API)
fixes #7005 / BZ 1122736 - content host - change registration behavior with foreman host

This commit alters the behavior of registering a content host
(with or without an activation key) that is to be associated
with a foreman host to do the following:

1. identify the foreman host that this content host will be
   associated with by both name and mac address (previously
   it was only by name)
2. if the foreman host identified is already associated with a
   content host, delete it and then create/associate a new one.
   (This will avoid there becoming duplicate content hosts with
   the same name.)
fixes #6970 - content host bulk actions - fix 2 regressions

Stumbled across a couple of issues that need fixing.

1. unable to perform bulk actions (via systems_bulk_actions_controller)
   due to permission denied errors
2. unable to retrieve applicable errata
fixes #7019 / BZ 1128473 - content search - change to eliminate errors with ambiguous 'id'

This commit is to update a few queries that use 'pluck' to be explicit
on the table that the attribute (id) is being plucked from.  Without them
the user can experience errors like:

Processing by Katello::ContentSearchController#packages as */*
  Parameters: {"repos"=>{"autocomplete"=>[{"id"=>"13", "name"=>"samrepo"}]}, "packages"=>{"search"=>""}, "content_type"=>"packages", "mode"=>"all", "environments"=>[2], "content_search"=>{"repos"=>{"autocomplete"=>[{"id"=>"13", "name"=>"samrepo"}]}, "packages"=>{"search"=>""}, "content_type"=>"packages", "mode"=>"all", "environments"=>[2]}}
PGError: ERROR:  column reference "id" is ambiguous
LINE 1: SELECT id FROM "katello_repositories" INNER JOIN "katello_co...
               ^
: SELECT id FROM "katello_repositories" INNER JOIN "katello_content_view_versions" ON "katello_content_view_versions"."id" = "katello_repositories"."content_view_version_id" WHERE "katello_content_view_versions"."content_view_id" IN (1, 2, 3, 4, 6) ORDER BY katello_repositories.name ASC (ActiveRecord::StatementInvalid)
Fixes #6971,bz1085417 - api handle nonexistent id

In capsule and product APIs, the show action for a nonexistant id fails
to give a proper 404.

for example /api/products/123123 where product 123132 does not exist
product gives 500 no resource loaded

capsule gives protected method `resource_name' called for
Fixes #7037 - We now get a message suggesting a possible cause
Fixes #7022 - Upgrade version of rubocop
Merge pull request #4553 from xprazak2/organization-nil-fix

Error message fix when organizations disabled
Fixes #7047/BZ1128467: get full result of product's repositories.

We were only getting the (default) first 20 results for a product's
repositories.  This commit ensures we fetch all of a product's
repositories for display.

http://projects.theforeman.org/issues/7047
https://bugzilla.redhat.com/show_bug.cgi?id=1128467
Merge pull request #4531 from parthaa/repo-discovery

Fixes #6944/bz1106434 - Fixed Repodiscovery product validation
Fixes #7045 - fix location undefined for user

Fix issue where location is undefined for User in find_only_environment
of the system api. Also remove un-needed logic in find_only_environment
and move remaining logic into find_environment_and_content_view.
Merge pull request #4568 from waldenraines/7047

Fixes #7047/BZ1128467: get full result of product's repositories.
fixes #6981 - handle non-yum sync statuses

Splitting out the sync presenter into a few different files
depending on the type
Merge pull request #4567 from dustint-rh/fix_find_only_environment

Fixes #7045 - fix location undefined for user