Update core.js

added toggleCommentTreeCollapse function