Increase default GDBusConnection timeout when running under valgrind
While running gnome-software under valgrind, it can happen the GDBus calls time out. The worst when a GDBusProxy is creating, which allows not timeout to be set. The PackageKit aborts the app when it fails to connect to the counterpart:
valgrind log of the crash
07:25:33:937 PK Cannot connect to PackageKit on /14474_cbdebadc
==31465==
==31465== Process terminating with default action of signal 5 (SIGTRAP): dumping core
==31465== at 0x4C689E7: g_log_structured_array (gmessages.c:1866)
==31465== by 0x4C6E376: g_log_default_handler (gmessages.c:3357)
==31465== by 0x4C65248: g_logv (gmessages.c:1246)
==31465== by 0x4C655B2: g_log (gmessages.c:1315)
==31465== by 0x5C75B0C: pk_client_get_proxy_cb (pk-client.c:2280)
==31465== by 0x4A829DB: g_task_return_now (gtask.c:1361)
==31465== by 0x4A86672: UnknownInlinedFun (gtask.c:1430)
==31465== by 0x4A86672: g_task_return (gtask.c:1387)
==31465== by 0x4AF0753: init_second_async_cb (gdbusproxy.c:1757)
==31465== by 0x4A829DB: g_task_return_now (gtask.c:1361)
==31465== by 0x4A86672: UnknownInlinedFun (gtask.c:1430)
==31465== by 0x4A86672: g_task_return (gtask.c:1387)
==31465== by 0x4AF0090: async_init_get_name_owner_cb (gdbusproxy.c:1467)
==31465== by 0x4A829DB: g_task_return_now (gtask.c:1361)
==31465== by 0x4A86672: UnknownInlinedFun (gtask.c:1430)
==31465== by 0x4A86672: g_task_return (gtask.c:1387)
==31465== by 0x4ADDCC5: g_dbus_connection_call_done (gdbusconnection.c:5895)
==31465== by 0x4A829DB: g_task_return_now (gtask.c:1361)
==31465== by 0x4A86672: UnknownInlinedFun (gtask.c:1430)
==31465== by 0x4A86672: g_task_return (gtask.c:1387)
==31465== by 0x4AD97C1: send_message_data_deliver_error (gdbusconnection.c:1831)
==31465== by 0x4AD9873: send_message_with_reply_timeout_cb (gdbusconnection.c:1875)
==31465== by 0x4C657E8: g_timeout_dispatch (gmain.c:4989)
==31465== by 0x4C5F68B: UnknownInlinedFun (gmain.c:3344)
==31465== by 0x4C5F68B: g_main_context_dispatch_unlocked.lto_priv.0 (gmain.c:4152)
The GDBusConnection hardcodes the default timeout to 25 seconds. Even the 25 seconds is a reasonable timeout for usual calls, when using slowdowns like valgrind it's not good enough, thus it would be good to be able to change this value from the outside or teach the code to recognize it's running under valgrind and make the timeout larger, like 90 seconds.