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-41192 course: Added unittests for cm_info properties