linking: traverse links recursively + avoid duplicates
linking: traverse links recursively + avoid duplicates

This makes sure the logic for resolving timer hierarchies and iterating
timers/counters of a context all traverse linked contexts recursively
and don't reprocess the same context more than once in a given
traversal.

The expectation is that the mainloop context will be linked into
multiple contexts but reporting shouldn't duplicate the statistics for
the mainloop timer.

rib/UProf,rib/UProf