Simplify the log tree implementation a bit

In particular use the :last-child selector, which is non-standard but
supported by all major browsers.
Factor out the tree rendering
Simplify the tree implementation a bit more
Render the dependencies as a tree
Turn repeated dependencies into hyperlinks
Revert to jQuery 1.8.3

1.9 removes the toggle() function which is actually useful (and used
by us).