Refactor comment window code into report-xul-comments.js