MDL-44071 Webservices:fix course sorting after course delete

fix web service core_course_delete_courses to call fix_course_sortorder after deletion of courses, return warnings if course can not be deleted, update unit tests

Signed-off-by: zbdd <zdurber@gmail.com>