Enlarge trace buffer size by powers of 2 instead reallocating foreach item

Currently the size of the trace buffer is just increased whenever
there is need to do so. However reallocating memory by only a
small enlargement may cost quite lots of time each time.
So in case this seems too slow, we should think about
increasing the buffer size in larger chunks, usually a
factor of 2 is chosen for such growing buffers, so do here.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>