MDL-41181 No need to reset modinfo cache after moveto_module()

it is already reset inside the function
MDL-41181 function moveto_module does not modify properties of object

instead it returns the new value for module visibility
MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current
MDL-41192 course: Can not write to the read-only properties of cm_info
MDL-41192 course: Properties of cm_info are read-only and calculated on request

Also added phpdocs
MDL-41192 course: Added property-read cm_info::effectivegroupmode
MDL-41218 Object section_info calculates expensive data on demand only

Added phpdocs, removed unnecessary fields such as course and userid because they can be retrieved from modinfo
MDL-41219 course: Make properties of course_modinfo read-only

added phpdocs