Quick bugfix to check that the 'Agent' field actually exists on a report
Added code to filter out 'merge' events, and to propagate a merge
event's parents to the merge event's children.
Previous modifications had changed so that getThreadContext would return
an empty collection if it's not valid or there is no current context. 
It's better (and more consistent with original implementations) to
return null, particularly since the collections are only ever likely to
be passed back in to XTraceContext methods, which have the requisite
null checks in place.
Make sure to add the logging class to the event itself.
D3 chartified the DAG rendering stuff.  Code for the rest of it is still
a bit untidy and there are improvements to be made, but the bulk of the
change is in.