Initial version of puppetdb v4

Hi,

This commit is probably incomplete, i haven't had a chance to check all the existing v3 APIs that will be exposed by the v4 subclass.  But I thought it might be a good idea to get some feedback about what i have done so far.  Would this be something that you would be willing to merge upstream?

Cheers,
Russell