gio: Fix conditions in memory-monitor test
We were lucky that this worked in some cases (the test is racy), but we should actually run the condition check each loop, rather than when the function is called.
Spotted by Martin Pitt: https://github.com/GNOME/glib/commit/96a8c02d240d7c9ae366c63771291413384bdfb7#r54773831