better metadata tests; switch from JSON to JSON::MaybeXS

Tests hashes more completely, and uses Test::Deep plugins for YAML and JSON rather than decoding ourselves; allows us to switch from JSON to JSON::MaybeXS quite easily.