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.
Updated unit tests.

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