use PyObject_SetAttrString, not PyDict_SetItemString when setting __gtype__
use PyObject_SetAttrString, not PyDict_SetItemString when setting __gtype__

* When registering a gtype wrapper we used to set tp_dict directly. This works
  in python 2 but python 3 seems to handle attributes in a slightly different
  way where the tp_dict and attr get out of sync.  By setting the attr
  directly we avoid this issue.
* Note that there are many more places where we set __gtype__ using tp_dict
  however for objects which are not instantiated yet we have to set tp_dict
  directly.
* Since this one change fixes a lot of failed tests, for now we ignore the
  other places where we set __gtype__.  If we run into more issues dealing
  with __gtype__ we can take a closer look later.

https://bugzilla.gnome.org/show_bug.cgi?id=627878

https://bugzilla.gnome.org/show_bug.cgi?id=615872

MathieuDuponchelle/pygobject,davibe/pygobject,alexef/pygobject,choeger/pygobject-cmake,jdahlin/pygobject,pexip/pygobject,GNOME/pygobject,jdahlin/pygobject,alexef/pygobject,choeger/pygobject-cmake,GNOME/pygobject,davibe/pygobject,choeger/pygobject-cmake,thiblahute/pygobject,Distrotech/pygobject,sfeltman/pygobject,nzjrs/pygobject,Distrotech/pygobject,davidmalcolm/pygobject,pexip/pygobject,davidmalcolm/pygobject,GNOME/pygobject,Distrotech/pygobject,nzjrs/pygobject,alexef/pygobject,thiblahute/pygobject,MathieuDuponchelle/pygobject,MathieuDuponchelle/pygobject,davidmalcolm/pygobject,davibe/pygobject,sfeltman/pygobject,Distrotech/pygobject,pexip/pygobject,davibe/pygobject,nzjrs/pygobject,thiblahute/pygobject,jdahlin/pygobject,sfeltman/pygobject