qtscript: Add new function syncRandom() for synchronized randomness.