Adjust and fix content view code

Make `ContentView.publish` and `ContentViewVersion.promote` return the full JSON
response from the server. Fix existing usages of those methods.

Many usages of those methods are in module `tests.foreman.api.test_contentview`.
Walk through this module and severely update some tests in this module in
addition to fixing existing usages of the aforementioned methods. In particular:

1. Collapse `ContentViewPublishTestCase` and `ContentViewPromoteTestCase` into
   `CVPublishPromoteTestCase`. Fix the `setUpClass` method by changing the
   `self` parameter to `cls`, and make the method generate just specialized
   objects instead of a mix of dicts and specialized objects.
2. Drop the `_publish` and `_promote` private helper functions.
3. Halve the number of test methods, but make each test method more compact and
   thorough.

    $ nosetests tests/foreman/api/test_contentview.py:CVPublishPromoteTestCase
    ......
    ----------------------------------------------------------------------
    Ran 6 tests in 786.747s

    OK
Merge pull request #1658 from Ichimonji10/publish-promote

Adjust and fix content view code
using org_label instead of org_name with subscription-manager register cmd
Test to associate custom and RH contents with activation-key

Updated test stub 'test_end_to_end_activation_key' to accomodate a new scenario
Added data as part of ddt to test checksum_type creation.
Merge pull request #1661 from sghai/ak-test

Test to associate custom and RH contents with activation-key
Merge pull request #1657 from kbidarkar/api-checksum-tests

Added data as part of ddt to test checksum_type creation.
Merge pull request #1654 from sghai/char-encoding

unicode encoding issue
- Updated cli/api smoke tests to use org_label with SM cmd
- Also randomly generating org_name with diff encodings
Update PERMISSIONS constant

Add container and mail notification permissions
Merge pull request #1664 from sghai/fix-smoke-tests

Updated cli/api smoke tests to use org_label with SM cmd
Merge pull request #1663 from elyezer/update-permissions

Update PERMISSIONS constant
Update CLI product test_remove_syncplan_1

hammer product remove-sync-plan does not require a sync-plan-id as the
relation of product and sync-plan is one to one.

Also improve formatting.
Merge pull request #1667 from elyezer/fix-cli-product-test

Update CLI product test_remove_syncplan_1
Update failing CLI content view tests

Update field lookup from repositories to yum-repositories on content
view info output.

Wrap unwrapped CLI factory calls with try/except.

Skip test_cv_associate_composite_dupe_modules_negative because a bug (BZ
1162799) that prevents that a puppet module to be added to a content
view by its name.

Use random choice to select a puppet module to be added instead of aways
getting the first one available.

Update field lookup from lifecycle-environments to environments for
content view info output.

"Readability counts."
Added multi-threading support for API
Usage
--------
make test-foreman-api-threaded

Before
------
Ran 759 tests in 1608.000s

FAILED (SKIP=99, errors=25, failures=10)
make: *** [test-foreman-api] Error 1

After
-----
Ran 742 tests in 287.268s

FAILED (SKIP=99, errors=12, failures=8)
make: *** [test-foreman-api] Error 1

Most additional errors are 500 Server Errors.
Because IDs are issued using sequences, we should not encounter
erroneous results, due to ID collisions.
Set longMessage to True for all TestCase classes

The longMessage will show on failures the defined message and also the
default assert message which will provide more information about the
failures.
Merge pull request #1668 from elyezer/update-cli-cv-tests

Update failing CLI content view tests
Merge pull request #1666 from JacobCallahan/multi-threading

Added multi-threading support for API
Skip tests due to BZ 1162860

Using a non-admin user to do anything causes an exception to be thrown with the
following error messages:

    {"error": {"message":"LdapError: No such address or other socket error."}}

Skip tests that fail due to this error. Before the change:

    $ nosetests tests/foreman/api/test_permission.py:UserRoleTestCase
    EEEEEEEE
    …

    ----------------------------------------------------------------------
    Ran 8 tests in 38.272s

    FAILED (errors=8)

After the change:

    setests tests/foreman/api/test_permission.py:UserRoleTestCase
    SSSSSSSS
    ----------------------------------------------------------------------
    Ran 8 tests in 16.383s

    OK (SKIP=8)