Fix UI vm summary performance (part 3)

Bypass tree walking code with an upfront query for the vandt tree.

https://bugzilla.redhat.com/show_bug.cgi?id=1086015

This change improves performance via a pipeline of methods that
- Query the entire vandt tree using the Relationship model.
- Prune the tree as much as possible for unused parts
- Prune via RBAC and remove empty folders
- Sort the tree
- Preload records for what's left
- Convert the relationship tree to a UI tree structure for dynatree.

The spec against a real database has gone from 23.1s to 4.3s, which is
an 81% improvement.  Cumulative performance including ee267dc, the spec
has gone from 33.2s to 4.3s, which is an 87% overall improvement.

Note that the performance is also consistent regardless of the depth of
the folder structure of the tree.

---

Additionally,
- Add Hash#sort! and Hash#sort_by! core extensions. Eventually this will more to more_core_extensions.
- Change EmsFolder#hidden? to allow for overrides.

---

Continuation of #120 and #81
@dclarizio @chessbyte Please review.
I prefer TreeBuilderVmsAndTemplates as well, but the UI code calls it by the symbol `:vandt` all over the place and I thought consistency was more important in this case.  I'll willing to change it though.