Fix dependency issues between repo configuration and package installation
(makes sure repo configuration is finished before installing packages).
Classes containing other classes need to use the anchor pattern to ensure this
(see http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html
and http://projects.puppetlabs.com/issues/8040 for details).
Fix grep bug when plugin version specified

 * The jenkins::plugin fact is a comma separated string of plugins. When
   a plugin version is specified, the string to search is:
   'myplugin 1.2.3,'

   However, the last plugin in the jenkins::plugin fact doesn't end with
   a comma. This results in that plugin not being found by grep() and so
   puppet tries to install the plugin on each run.

   Adding a simple regex alternation checking for comma or end-of-string
   (,|$) fixes this.

 * Added test cases.
Merge pull request #109 from mark0n/master

Fix dependency issues between repo setup and package installation
Merge pull request #111 from butlern/fix_plugin_grep_bug

Fix grep bug when plugin version specified