Refinements and fixes from backporting discussion xblock to edx-solutions:

* Styling fixes
* Runtime-specific overrides for DiscussionUtil parameters
* Discussion XBlocks included in category map
* Removed DOM Ready jQuery handler in main.js - discussions are now initialized externally
* Fixed static assets management in production environment (when pipelines are in effect)
* Fixed bug: when editing thread for the second time after type have changed js error was thrown and no tet input was present
* Switched to using cached_has_permission from templates instead of pre-populating template context
Added rtl support for discussion