Split get_courses_for_wiki impl

LMS-2914
Split should be agnostic to branch names, such as `draft` and `published`.  So we should try to keep even the docstrings generic.