random questions: MDL-17185 regression from MDL-17160 random questions were no longer randomising.
random questions: MDL-17185 regression from MDL-17160 random questions were no longer randomising.

Backporting Jamie's fix to 1.9, and making a minor improvement along the way.

dilawar/moodle