* fixed order of deleting in course adn context
* adding course context to event data because it is not available alter and some stuff may depend on old context id
* adding option for context purging (keeps the context record because it might be still referenced later and it would be recreated)
* new course enrol cleanup
* removing content from some course fields that were referencing deleted content
* coding style and phpdocs improvements