gimpobject: Use G_DECLARE_DERIVABLE_TYPE()
From the last commit message:
This removes quite a bit of the usual GObject boilerplate (and
technically gives us also g_autoptr support, although that is less
relevant for our use case). Since it's a base class, this will allow us
to also use the `G_DECLARE_*` macros on its subtypes.