EnvelopeSender: async flush
Created originally on Bitbucket by cdevienne (Christophe de Vienne)
Currently the EnvelopeSender flushes are done synchronously with AddItems when the buffer is full.
Asynchronous flush, while bringing complexity, would provide new features :
- Client code is not suspended waiting for server reply
- Fragments can be sent in parallel -> faster throughput
- Autoflush after a timeout: if the buffer is untouched for N millisecond (say 500), it is flushed.