Add revert_to_published method.

STUD-1860
Merge pull request #4344 from edx/christina/revert_to_published

Add revert_to_published method.
This emits enrollment mode changes events
Merge pull request #4309 from edx/nimisha/refactor_mixed_context_managers

Nimisha/refactor mixed context managers
Enables LMS to handle deprecated URLs

LMS-2651
Merge pull request #4285 from edx/jhelbert/enrollment-mode-change-events

Jhelbert/enrollment mode change events
Merge pull request #4353 from edx/flowerhack/lms-deprecated-urls

Enables LMS to handle deprecated URLs
LMS-2947 remove get_error_courses in Split.
LMS-2950 move delete_course to Mongo.
Fix all modulestore calls to pass in user ids.
Update tests to allow LMS tests to use published branch setting.

Conflicts:
	cms/djangoapps/contentstore/views/tests/test_container_page.py
	common/djangoapps/external_auth/tests/test_shib.py
	common/djangoapps/student/tests/test_login.py
	common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
	common/lib/xmodule/xmodule/modulestore/tests/factories.py
	common/lib/xmodule/xmodule/modulestore/xml_importer.py
	lms/djangoapps/branding/tests.py
	lms/djangoapps/courseware/tests/test_submitting_problems.py
	lms/djangoapps/courseware/tests/test_video_handlers.py
	lms/djangoapps/instructor_task/tests/test_base.py
	lms/djangoapps/instructor_task/tests/test_integration.py