MDL-43736 Events: event->contextinstanceid should be used where possible

While restoring event context might not be present (deleted)
So before using context api's check context or use event properties
MDL-43736 Events: Updated unit test to test context not used in event
Merge branch 'MDL-25500-master-fix1' of git://github.com/damyon/moodle
MDL-43450 behat: Checking the ->behat_* vars contents before showing the steps list
MDL-42928 Filepicker: Disable behat tests run by phantom

There seems to be a bug relating to overflow: hidden on the body tag in
some cases which is only showing for dialogues which belong to the
filepicker.

Disabling these for the moment as this issue may be related to MDL-43712
which is a work in progress.
MDL-25502: Added "black magic" task allocator for cron
MDL-25503: Add step to cron to run all scheduled tasks
MDL-25504 cron: Refactor to use scheduler

Conflicts:
	lib/cronlib.php
MDL-25505: Add an admin interface to schedule tasks via cron.