cogl/texture: Type check introspected calls
CoglTexture can be used by e.g. Javascript, and the convention is to be more forgiving regarding passed input so that invalid Javascript calls doesn't cause actual SIGSEGV/SIGABRT. As elsewhere, do this by sprinkeling g_return(_val)_if_fail() on introspected functions.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2124322