fixed ActiveGraph retrieval, no more re-instantiation when present in ThreadLocal
Minor optimization in usage of graph
Merge branch 'graph_factory_fix' into develop