Fix overflow in uniform_real_distribution. Fixes #8351.

Fix #8351 with a solution proposed by Steven.
See reference to the mailing list:
https://groups.google.com/forum/#!msg/boost-list/OS_rZiQKios/z_bDMfiIHYcJ

I hope that 'develop' is the right branch to propose pull requests to.
Please tell me if my workflow is incorrect.
Any remark on my implementation also apreciated.