Moved primitive tab-edit functions to tabs.py

Updated edit_course_tabs command to use those functions.