Fix dependency issues between repo setup and package installation

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).