garray: Optimise over-allocations with g_array_insert_vals()
When over-allocating by inserting values off the end of an array, maybe expand the array once, rather than twice (once for setting the size and once for appending the values).
Suggestion by Peter Bloomfield (@peterb) as a follow-up to #1374 (closed).
Signed-off-by: Philip Withnall withnall@endlessm.com
Edited by Philip Withnall