Use interrupt_with_signal for FFI calls

This ensures that FFI calls that take longer can be interrupted when for
example an exception is raised into the thread. By changing this we make
sure a SIGVTARLM is sent in those cases so the exception can be handled
properly.

Fixes #2127