Refactor course search into course.py to be reuseable
Make a pass at cleaning up the search code
Default to popularity on sort_mode=friends if no current user
Add the /api/v1/search/courses endpoint