Remove HTML only used by the JavaScript

The `<div class="title-controls-wrap">` us only used if the JavaScript has loaded -its part of the controls used for the collapsible sections.

This PR removes this HTML from the templates and adds the JavaScript to build it after document.ready. This means if the JS hasn't loaded for whatever we don't have bits of HTML floating around that aren't used.


This bit reads quite confusingly. Does it say if the title is empty (equal to an empty array) then you prepend the empty object to the collectionControlsWrap?