Backport !1481 “array: fix corrupt state of GPtrArray after g_ptr_array_extend_and_steal()” to glib-2-64
g_ptr_array_extend_and_steal() leaves the GPtrArray in an invalid state, so if you would try to append another pointer, it leads to a crash.
Also adjust the test case so that it would result in the crash (without the fix).
Fixes: 0675703a ('Adding g_ptr_array_extend_and_steal() function to glib/garray.c')
Trivial backport of !1481 (merged) to glib-2-64
.