Fix a stack handling bug for Perl vfuncs

When there is a Perl implementation for a vfunc, invoking a C function that
invokes this vfunc might end up reallocating the Perl stack and hence
invalidating the local 'sp' pointer.  Fix with a pair of PUTBACK/SPAGAIN.

Triggered by Gtk3's test suite.