PUP-1244 puppet4

As requested, this is a rebase of my earlier PR, https://github.com/puppetlabs/puppet/pull/2262, on the puppet-4 branch. So far I've only run specs locally.

Description of the original PR, for reference:

Puppet uses one vercmp method for all package types by default. Unfortunately that method assumes the packages use semver, which RPM and Yum do not.

This is an almost line-for-line port of the version comparison algorithms in Yum (Python) and RPM (C) to Puppet. The comments I left in show how insane the actual version comparison algorithm is. It's essentially a bunch of special cases that might eventually fall through to strcmp().

I've also brought over all of RPM's upstream test cases and included them in rpm_spec.rb as a reference/sanity check.

Highly doubtful. It doesn't appear ([1]) that the underlying logic has changed in at least 11 years. If it does, it will likely break packaging in unexpected ways across a whole bunch of distros, so I don't think that's very likely. Also, this strange logic is clearly tested for [2], so I'd say that makes changes even less likely.

[1] http://rpm.org/gitweb?p=rpm.git;a=history;f=lib/rpmvercmp.c;h=b3d08faa4a31354d821cb259106b182410e452fb;hb=HEAD
[2] http://rpm.org/gitweb?p=rpm.git;a=blob;f=tests/rpmvercmp.at;h=2a25bdd9b53caa3f1d757ef5448523a2b06fdae4;hb=HEAD