Handle RAND_MAX < 2^32 in get_random_gint64()

MacOSX, for example, sets RAND_MAX at 65535, which rather limits the
size of random gint64s on that platform.

Fixing this revealed some odd behavior in creating random interest rates,
so created a specific function for that with a somewhat more reasonable
approach.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23493 57a11ea4-9604-0410-9ed3-97b8803252fd
Test for overflow limits in gnc_numeric_add.

For analysis of Bug 665707.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23494 57a11ea4-9604-0410-9ed3-97b8803252fd