Fix random range used in RandomPara

Was crashing when trying to open the print dialogue.
This may or may not be related to issue #40.
Use proper glib random functions where appropriate

Since we're already using glib for g_random_int(), we might as
well use the other random functions g_random_double() in place of
g_random_int() / RAND_MAX and g_random_int_range(0,x) in place of
g_random_int() % x
Merge pull request #1385 from jtanx/printdlg

Fix random range used in RandomPara