MDL-44257 message: check if the attachment exists before remove it

Credit goes to Mark Nielsen, thanks.
MDL-46588 web services: Fixed invalid check of empty contextid in function get_context_from_params
MDL-46588 web services: Unit tests added
MDL-46588 web services: Fixed system context instanceid eq 0 case
Merge branch 'MDL-46588-master' of git://github.com/jleyva/moodle
MDL-47079 user: behat test for deleting users
MDL-44257 message: added test to make sure the stored file still exists
MDL-44257 lib: fix the attachment code to accept tempdir and dataroot.

Credit goes to Damyon, thanks.
Merge branch 'MDL-44257-master' of git://github.com/lameze/moodle
MDL-47225 core: Add ability to normalize component names
MDL-47225 core: Tidy up component normalisation tests
MDL-44257 Message: Update phpdocs for email_to_user function
Merge branch 'MDL-47225-master' of git://github.com/andrewnicols/moodle
MDL-46613 grades ws: Fixed external function declaration

Gradebook items with overridden grades was causing error as Web
Services response
Merge branch 'wip-MDL-47079-master' of git://github.com/marinaglancy/moodle
Merge branch 'MDL-46613-master' of git://github.com/jleyva/moodle