The profiler and benchmarking showed that calling evbuffer_add() repeatedly is very costly. To avoid this, we buffer up small writes into one large chunk and call evbuffer_add() less times.