Refactor CaptionsPanel.js so that it doesn't write to the DOM directly, but uses mustache+dom templates instead
This is purely an engineering ticket, and so there should be no change in functionality
Acceptance criteria:
- CaptionsPanel.js writes to the DOM using only templates
- nothing breaks