Fixes #5986: Ensure tipsy error details populated on sync status page, BZ965230.

On the sync status page, if an error occurred during sync (e.g. using a URL
that doesn't point to a real repo) the tipsy with error details would not contain
the information until the page was reloaded.
Fixes #5968: Intercept candlepin request to get available releases

Intercept requests to GET /consumers/:id/available_releases and return
the system's available release versions as viewed by katello.

Added /api/available_releases to the root resource so that RHSM
can check to see if it is enabled on the server.

This API is only intended to be called by a registered consumer.
Fixes #5911 - perms for system registration calls

Also handles env lockin/cv lockin for content view remove

Rules of the Game
To register a system one needs
1) create_content_hosts (under content hosts resource)
2) view_content_views
3) view_environments

Also cleaned out some old code.
Merge pull request #4179 from ehelms/fixes-5986

Fixes #5986: Ensure tipsy error details populated on sync status page, BZ965230.
Merge pull request #4181 from mstead/Fixes-5968-release-versions

Fixes #5968: Intercept candlepin request to get available releases
Merge pull request #4147 from parthaa/sys-registration

Fixes #5911 - Added permissions for content host registration calls