puppetmaster: Add a few cleanups and fixes

Pending a fix for http://projects.theforeman.org/issues/2343 ,
this allows the puppetmaster and agent to be provisioned and configured
in full auto mode.
dasz: add local fix-and-hack class