(#114) Handle 0.6.1-rc1 style RC tags in git

My previous code for automatically generating version numbers, and the
changelog, worked fine for regular releases, and for the nightly builds, which
were all that we had ever made of this project.

Now that we have tagged our first RC, a shortfall is exposed: my code
incorrectly identified an RC version as being a nightly build, and then failed
during generation of the build number.

This fixes that, by treating anything that isn't in the form "a.b.c-N", where
N is a number, as an RC version.  Given `git describe` will generate a number
in the second slot for the "number of commits since the tag", in a nightly
build repository, this seems the safest choice.

Specifically, we now map:

 * 0.6.1-1-foo     => 0.6.2-1-foo       # 0.6.1 to 0.6.2
 * 0.6.2-rc1       => 0.6.2-rc1         # stays the same
 * 0.6.2-rc1-1-foo => 0.6.2-rc2-1-foo   # rc1 to rc2
 * 0.6.2           => 0.6.2             # stays the same

This modifies both the Modulefile and changelog generator, since both
calculate the next version of the module.

It also extracts the logic for generating the version number into a separate
Ruby script, since the complexity had grown to the point it was worth the cost
of factoring that out.

This closes #114, and fixes the currently broken RC build.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Git should ignore the CHANGELOG file

The changelog is machine generated, so should be ignored.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Merge pull request #115 from daniel-pittman/bug/master/114-fix-automatic-changelog-generation-for-rc-builds

Fix automatic changelog generation for rc builds