Replace the last rand() with mt_rand()

Better entropy, faster.
Also fixed a few "it's" typos.
Merge pull request #2686 from vlakoff/develop

Replace the last rand() with mt_rand()
Fix issue #2681 (alternative to PR #2690)
[ci skip] Fix a changelog entry