random: fix data races at timer_rand_state