MDL-40127 Enrolments: Abstracted self_enrolment code so as to be used by webservices
MDL-40127 Enrolments: Added status to instance info and removed displaying of enrolment form with notice

get_enrol_info will return status of enrolment instance, to notify webservice if enrolment is possible or not
If enrolment is not possible then don't show enrolment form
show_enrolme_link will use can_self_enrol to varify if enrolment link should be shown or not.
MDL-40127 Enrolments: Added unit test
MDL-40127 Enrolments: Updated version and update.txt