switch from JSON.pm to JSON::MaybeXS

This changes the JSON backend from JSON.pm (which only uses JSON::XS) to JSON::MaybeXS, which selects between backends depending on what is already installed and loaded.