Change GLib.PtrArray into GLib.GenericArray

This is the vala-friendly way of handling GPtrArray.
Fix several memory leaks on the go and unnecessary reference increase.
Status Job ID Name Coverage
  Test
passed #943399
build-fedora

00:15:17