common: Don't do repeated linear reallocation of array memory
common: Don't do repeated linear reallocation of array memory

Some mallocs (notably on Windows) have really poor behavior when
called repeatedly with a linearly growing buffer.

https://bugzilla.redhat.com/show_bug.cgi?id=985419

freedesktop-unofficial-mirror/p11-glue__p11-kit,lkundrak/p11-kit,pspacek/p11-kit,pspacek/p11-kit,freedesktop-unofficial-mirror/p11-glue__p11-kit,lkundrak/p11-kit,pspacek/p11-kit,pspacek/p11-kit,lkundrak/p11-kit,freedesktop-unofficial-mirror/p11-glue__p11-kit