gmetrics: Run metrics timeouts on dedicated thread

Some of the timeout handlers can take seconds to complete, so
run them from their own thread instead of the main thread.
1 file changed