Remove @graph from compacted output when it is empty and the only member

See discussion in https://github.com/json-ld/json-ld.org/commit/87a4681c35748ff92d2912e2fc480ca957c5cf5f.
Sort quads before comparing them in JsonLDTestSuiteTest::testToRdf()

The expected results have been updated to be sorted.