Refactor tree.js to rely on util/has-css3

This refactor was long overdue, and should reduce the awkwardness on first expand/collapse that was present before due to on-the-spot detection.