Discsussion XBlock fixes

Background: This PR contains some fixes required to run edX solutions client's systems. Some of those fixes are not yet added to edx/master PR as it's suspended for a little while.

Discussions: most of discussions happened around upstream PR: https://github.com/edx/edx-platform/pull/5565

Partner information: 3rd party-hosted open edX instance, for an edX solutions client.

Merge deadline: before release cuts off.