To simplify future code using the G_DEFINE_TYPE_xxx macros, move all
the interface registration out of the get_type/register_type functions
and into a separate function.
And while we are doing this, factor out some common code between the
different add_xxx_get_type functions.