Plugin network: add support for the timeout argument in the flush callback