Fixes for cycles in JSON generation

Fixed DFS DAG generation so that we traverse outgoing links first
before flipped links.
Fixed JSON RDF Generation so only output URIs for root objects when
referenced by nested objects.
Fixed GenericRDFGenerator so it will use a strategy when it’s passed in.