Switched to DocumentFragments when building menus.

Adding elements directly to the DOM causes a reflow,
and is not necessary. Instead, elements are created
on a DocumentFragment and the docfrag itself is added
to the DOM once. (instead of on every item creation)