Reruns/cms server side LMS-11016

This PR is an updated version of this old one: https://github.com/edx/edx-platform/pull/4573
I think we want to be doing a progressive move towards "course_key" - in the OK work, we changed to "course_key" in almost all self-contained methods and only retained "course_id" where significant refactoring would be requiered. I think "course_key" is the better variable name to be using for new code.