Ensure parameters that contain maps are sorted (recursively)

Sometimes parameters contain hashes, these hashes may be randomly ordered by
Ruby before they hit PuppetDB. This patch ensures those structures are sorted
recursively first to ensure the duplicates that are just suffering from
different ordering are matched properly.

Signed-off-by: Ken Barber <ken@bob.sh>