Author: Tim Hunt
MDL-64799 qtype_random: orphaned random questions should be deleted
This is a back-port of MDL-63260
This fix is based on some original code written by Bo Pierce.
http://git.moodle.org/gw?p=moodle.git;a=commit;h=ad4dfb1e8cb7b0b2cac3d8598bb4df7cee266a85
http://github.com/moodle/moodle/commit/ad4dfb1e8cb7b0b2cac3d8598bb4df7cee266a85
+ 3.4 en [taskunusedrandomscleanup,qtype_random]