Add random sleep intervals to increase chances of thread interleaving

We don't have much control over VM scheduler, so will have to
do this.