843529 - cleanup task_statuses and job_tasks on system deletion

This commit addresses the following general issue:
- systemA exists
- systemA is a member of a system group
- an action is performed on the system group

- performing this action creates a job along with a set of tasks
  (1 for each system in the group), joined together by job_tasks

- systemA is deleted

- when user attempts to access a System Group Event History item
  that involved systemA, they get an error... the issue is that
  the DB was not cleaned up properly when the system was deleted...
  the system was gone, but the task_statuses and job_tasks records
  remained...

With this change, the entries in the task_statuses and job_tasks
will now be deleted when the system is deleted.  In addition, in
the off chance that record wasn't cleaned in the DB, the UI view
was updated to handle the error cleanly.
skip RHSM test when registred against hosted

addressing:
rhsm registration with org              [ FAILED ]
subscription-manager register --username=admin --password=admin --org=org_Y9VdNJY0p8AI --environment env Y9VdNJY0p8AI --name=FILTERED_HOSTNAME_Y9VdNJY0p8AI --force
ERROR: Server does not support environments.
WARNING

This system has already been registered with RHN using RHN Classic technology.

The tool you are using is attempting to re-register using RHN Certificate-Based technology. Red Hat recommends (except in a few cases) that customers only register with RHN once.

To learn more about RHN registration and technologies please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
removing package cheetah from the system
...
...
rhsm registration with org              [ FAILED ]
subscription-manager register --username=admin --password=admin --org=org_manifest_Y9VdNJY0p8AI --name=FILTERED_HOSTNAME_Y9VdNJY0p8AI --force
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html
WARNING

This system has already been registered with RHN using RHN Classic technology.

The tool you are using is attempting to re-register using RHN Certificate-Based technology. Red Hat recommends (except in a few cases) that customers only register with RHN once.

To learn more about RHN registration and technologies please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
rhsm subscribe to pool                  [ FAILED ]
subscription-manager subscribe --pool 8aa2b6a63996ee0a013996f412c70023
This system is not yet registered. Try 'subscription-manager register --help' for more information.
rhsm set releasever                     [ FAILED ]
subscription-manager release --set 6.2
This system is not yet registered. Try 'subscription-manager register --help' for more information.
rhsm unsubscribe all                    [ OK ]
rhsm unregister                         [ FAILED ]
subscription-manager unregister
This system is currently not registered.
rhsm list available SLAs                [ FAILED ]
subscription-manager service-level --list --org=org_manifest_Y9VdNJY0p8AI --username=admin --password=admin
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html
rhsm registration with SLA              [ FAILED ]
subscription-manager register --username=admin --password=admin --org=org_manifest_Y9VdNJY0p8AI --name=FILTERED_HOSTNAME_Y9VdNJY0p8AI --servicelevel=SELF-SUPPORT --autosubscribe --force
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html
WARNING

This system has already been registered with RHN using RHN Classic technology.

The tool you are using is attempting to re-register using RHN Certificate-Based technology. Red Hat recommends (except in a few cases) that customers only register with RHN once.

To learn more about RHN registration and technologies please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
rhsm unregister                         [ FAILED ]
subscription-manager unregister
This system is currently not registered.
855184 - Using --add_package gives undefined method `empty?' for nil:NilClass error
add foreman dependecies
Merge pull request #592 from xsuchy/pull-req-rhsm-test2

skip RHSM test when registred against hosted
Merge pull request #605 from Pajk/855184

855184 - Using --add_package gives undefined method `empty?' for nil:NilClass error
786226 - List of product repositories not sorted alphabetically
Merge pull request #604 from xsuchy/pull-req-foreman-deps

add foreman dependecies
put -debuginfo and -doc package in our yum repo
Merge pull request #609 from xsuchy/pull-req-debuginfo

put -debuginfo and -doc package in our yum repo
754738 - properly return when katello is not configured

echo_failure always return 1, so that return is never executed
75473 - do not delete nor truncate log

leave it up to logrotate to do cleaning
use runuser instead of su

see https://bugzilla.redhat.com/show_bug.cgi?id=460547#c0 for background
754738 - log even output of service stop
75473 - correctly solve status for all processes of delayed_jobs
754738 - if we fail in stopping delayed_jobs, kill it. One by one.
754738 - if program is already running, print failure, but return 0

That is what everybody else is doing. Lets do that too.
754738 - fix name of monitor pid file
754738 - do not override status() from /etc/rc.d/init.d/functions
754738 - do not override variables in other procedures