19284 - Support for simple statitistics gathering

The last_run_summary action will now also return a small hash containing
a key for each type present on the system and how many instances of
each:

  :type_distribution=> {"Cron"=>1,
                        "Package"=>97,
                        "Group"=>1,
                        "Yumrepo"=>12,
                        "User"=>4,
                        "Exec"=>11,
                        "Service"=>39,
                        "File"=>214,
                        "Mailalias"=>2}

Eventually something in the application will expose this data, for now
we're just producing the data.

This commit also DRY up some of the code around producing the summary
data across different puppet versions