Inline g_maybe_expand_arrays predicate
Submitted by Chris Wilson
Link to original bug (#395046)
Description
In the vte profile, the overhead of g_maybe_expand_array is noticable, though small. We can reduce the overhead by inlining the test and remove the conversion of length into bytes by tracking the number of allocated elements rather than allocated bytes.