grand: restructure a bit

Instead of having lots of 'if NULL then allocate' code segments for the
global GRand instance, move it to a single getter function that everyone
calls.
tests: fix leak in mainloop test

Properly unref a pair of GSources in the unix-fd mainloop test.

valgrind was reporting these as 'still reachable' before (possibly due
to some residual pointers somewhere in memory), but when running with
G_DEBUG=cleanup they were properly reported as leaked.
gerror: Don't leak when warning about overwriting an error

While not strictly necessary, this fixes a false positive
leak in the tests.

https://bugzilla.gnome.org/show_bug.cgi?id=627423
qdata: Fix leak in qdata unit tests

https://bugzilla.gnome.org/show_bug.cgi?id=627423
signals: Fix memory leaks in signals unit tests

https://bugzilla.gnome.org/show_bug.cgi?id=627423