MDL-30098 core_course: adding webservice functions to allow the deletion of module instances