deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified JSON-LD