Fix pson pure in 2.7.x for AIX.

Prior to this commit, PSON pure would fail on AIX for 2 reasons: 1)
AIX's Power processor is little endian and we specifically request
`utf16-be` for big endian, and 2) iconv on AIX is case-sensitive, which
means it knows about `UTF-8` and `UTF-16`, but not `utf-8` and `utf-16`.
This commit ignores the endian problem and instead just upcases the
requested encodings. This patch only applies to Puppet 2.7.x as iconv
has been removed from pson pure in 3.0+.
(#7841) Always read SELinux module header as little endian

These are always little endian, but are currently being read as native
byte order, which obviously causes failures.
Fix service enable specs on platforms without enable

These specs use the default service provider, but in the case where that
provider doesn't support the enable property, they were failing when
testing various values for that property. Many of these went unnoticed
because they weren't actually making any assertions, but rather checking
that nothing failed, so now they do assert.
Use the right provider instance in launchd provider specs

These tests were creating a resource and a launchd provider instance
from that resource, when the resource already has a (default) provider instance.
In most cases this was working fine, because the resource's provider
instance wasn't often being referred to. However, a couple of tests were
trying to set the enable property of the resource, which fails on systems without an
enableable provider. Now, we explicitly set the resource's provider to
launchd, as use its provider instance for all of our tests.
Fix posix exec provider spec on systems with /bin/cd

This test was setting path to /bin with the assumption that it didn't
contain cd, and therefore the only cd would be a shell built-in. On
system which *do* contain /bin/cd, this was failing. Now we just use a
bogus path so this will work everywhere.
Skip test that runs git if we can't run git

This test was assuming, incorrectly, that it will always be run from
inside a git repo with git installed. Now we properly handle the case
where it's not, and skip the test.
(maint) RPM package provider broken on AIX.

Prior to this commit, the RPM package provider would barf when
attempting to run `self.instances` on AIX. The culprit is the archaic
version of RPM (3.0.5) on AIX. The RPM provider assumed that the
`--nodigest` option (introduced in 4.0.2, circa 2001) was available.
This commit removes the `--nodigest` option for RPM versions older than
4.0.2.
Explicitly fail on downgrades in the AIX package provider

Downgrades do nothing because the package is superseded by a newer
version, but still don't exit non-zero. The only way to downgrade is to
force the installation, which requires us to ignore dependencies. As
this isn't palatable, we now explicitly fail if we see that the
package was superseded by a newer version.

This also fixes an issue of using << vs. +=, which would cause the
resource's name to be modified during installation.
(AIX) Convert rpm comparisons (regex -> semver)

Prior to this commit, the RPM package provider was using regular
expressions for comparing versions of the `rpm` utility. The regex
method, while functional, is not exactly readable nor does the regex
hold up once `rpm` hits version 10. This commit uses SemVer (even though
the `rpm` versions are *semantically* versioned, the SemVer library
already exists and can easily handle version comparisons) for checking
the specific cases of `rpm` versions < 4.1 and < 4.0.2.

Sprintly: fixes item:195
(AIX) backport of master rpm_spec + fix for 2.7.x

This commit can, and should, be trashed when we merge the aix
integration branch into master.
(AIX) Add option tests for various crusty RPMs

Prior to this commit, we had no tests for the changing behaviour based
on version of RPM release. This commit add tests for magical old
versions of RPM, like that on AIX, 3.0.5 aka before the time began.

Sprintly: fixes item:195
(AIX) Change ternary to unless for old RPMs

Prior to this commit, the RPM package provider used a less readable
ternary operator for determining which flags to pass to `rpm`. This
commit alters each of those to be a simple suffixed `unless` condition.

This commit also includes the more correct `rpm --version` output which
contains a "\n", and the corresponding `strip` on the version number.
Merge pull request #1417 from jeffweiss/ticket/2.7.x/195_aix_hates_rpm_releases_that_arent_old_enough_to_drive

(AIX) RPM package provider broken on AIX.
Merge pull request #1408 from nicklewis/aix-specs

(AIX) Fix some failing AIX specs
Merge remote-tracking branch 'nicklewis/aix-7841-selinux-little-endian' into aix

* nicklewis/aix-7841-selinux-little-endian:
  (#7841) Always read SELinux module header as little endian
Merge remote-tracking branch 'nicklewis/aix-package-downgrades' into aix

* nicklewis/aix-package-downgrades:
  Explicitly fail on downgrades in the AIX package provider
Merge pull request #1415 from jeffweiss/ticket/2.7.x/151_iconv_hates_aix

(AIX) Fix pson pure in 2.7.x for AIX.
(AIX) Exclude arch from uninstall on old RPMs

Prior to this commit, the RPM provider assumed that `rpm` would
know what to do with the architecture (e.g. i386, x86_64, ppc)
when uninstalling a packages (e.g. `rpm -e mypkg.i386`).
Unfortunately, this only works for relatively modern versions of
`rpm` (4.2.1+).  This commit checks the version of `rpm` and will
add or exclude the architecture from the arguments sent to `rpm`.

Sprintly: fix item:251
(AIX) Remove RPM test from yum spec

Prior to this commit, the yum package provider spec was testing
functionality that did not exist in the yum package provider, but
rather in its parent, the rpm package provider. This commit removes
that test because now we have a proper rpm provider spec.
(maint) RPM install should have --oldpackage

Prior to this commit, the RPM package provider would force the
`--oldpackage` option; however, older versions of RPM (i.e. 3.0.5 on
AIX) don't really like `--oldpackage` when you're doing an installation.
Rather than treat it as a NOOP, the older versions of RPM fail. This
commit changes the behaviour so that `--oldpackage` is only used when
the package is an up-/down-grade.

Sprintly: fix item:208