array: fix corrupt state of GPtrArray after g_ptr_array_extend_and_steal()
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')