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>
fix sorting in planetarium tests

Signed-off-by: Ken Barber <ken@bob.sh>
Refactor resource-identity-hash tests to be more relevant

This patch decomposes the resource-identity-hash so that the serialize
mechanism is separate and test-able without the memoize front-end.

It also expands the testing for sort-nested-maps to cover other data
types, does more analysis of the parts to make sure they are sorted as
well as apposed to internal comparison as clojure will always make
this true regardless of sort order.

Signed-off-by: Ken Barber <ken@bob.sh>
Introduce a generic string and hash mechanism for identity + more tests

Signed-off-by: Ken Barber <ken@bob.sh>
Use more performant version of sort-nested-maps

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