Use FastRandomContext instead of boost::random::{mt19937,uniform_int_distribution}.
Also include the fix from PR14093 fixing type mismatch (int truncated to
bool).
Backport of core PR10547 and PR14093
https://github.com/bitcoin/bitcoin/pull/10547/files
https://github.com/bitcoin/bitcoin/pull/14093/files