(PDB-1029) Provide an arity detection for backwards compatibility for profiling

This patch fixes the arity problem on the oldest version of Puppet we support
by adding a compatibility layer that uses the correct argument list based
on the methods arity available.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1160 from kbarber/ticket/stable/pdb-1029-fix-profile-compat

(PDB-1029) Provide an arity detection for backwards compatibility for profiling