If we're running on Valgrind, we'll be making forward progress at a rate of somewhere between 1/25th and 1/50th of normal. This can cause shutdown timeouts frequently enough to be a problem for the Valgrind runs on automation. As an attempt to avoid the worst of this, this patch scales up the presented timeout by a factor of three. For a non-Valgrind-enabled build, or for an enabled build which isn't running on Valgrind, the timeout is unchanged.