Move to rand_r(). Add new preset. Reorder and rename some fields. Clean th::random() args.