Make json test-data easier to read

Also allow test-data to be regenerated more easily with
env variable REGENERATE_TEST_DATA
Allow source and destination to be scalars or objects
Start TestHelper module to build test dags
Fix: to_hashref should sort edges list