Add a management command to dump xml courses

This command loads the courses with the XMLModuleStore, and then exports
the fields contents as json in a diff-friendly way. This can then be
used to validate against regressions in the xml parsing code.
Make sure that we have the right set of fields available during xml parsing

We had a bug where mixins weren't being applied before `load_from_xml`
was called. This meant that not all of the fields were being loaded
correctly. To fix it, we used the mixoligist from the runtime to apply
the mixins earlier in the process. However, that caused the mixins to be
applied twice.

The included fixes to xblock resolved the multiply-applied mixins, and
the fixes to the parsing code make it simpler to understand, and add
some unit tests of the parsing to boot.
Fix for PR 1119.

A Jasmine test was falling. It went unnoticed. The PR was merged. This
is a fix for it.
Merge pull request #1154 from edx/valera/fix_failing_jasmine_test_return_correct_caption_index

Fix for PR 1119.
Merge pull request #1055 from cpennington/cleanup-xml-hotfix

Clean up after hotfix to fix xml loading for import