XBlock studio view render for module previews

Replace `module.get_html()` with `runtime.render()` for XBlock integration with Studio. This branch also reformats and cleans up a bit of code surrounding this area.