runtime: Handle allocating memory in cgo/SWIG function.

A function that returns an interface type and returns a value
that requires memory allocation will try to allocate while
appearing to be in a syscall.  This patch lets that work.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201226 138bc75d-0d04-0410-961f-82ee72b054a4