(SERVER-112) clean up master.rb

In some forthcoming changes for SERVER-112, I'm going to need to pass some additional data in to the constructor of the `Puppet::Server::Master` class.  As I was refactoring it to allow this, I felt like a general cleanup was overdue.

This PR has several incremental commits that lead to what I think is an improved organizational structure for the relevant code that used to be in `master.rb`, and which will make it much easier/cleaner for me to do the follow-on work for SERVER-112.


I think this needs a ```require 'puppet/server/certificate'``` since the `client_cert` function below uses it.  Without this, I get a "uninitialized constant Puppet::Server::Certificate" error when I do an agent run against the master.