gio: Add GMemoryMonitor to monitor for low-memory
Add a memory monitor object, with D-Bus and Portal based implementations. The D-Bus implementation uses the Linux-only low-memory-monitor Freedesktop project.
The API is simple, similarly to equivalent functionality on iOS and Android platforms.
Prior art:
- https://developer.android.com/reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)
- https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle/responding_to_memory_warnings
Fixes: #969 (closed)
Edited by Philip Withnall