Move error-handling-related ffi decl to proper file

Just realized that `ffi.cdef` are shared amongst all ffi objects: there is
only one declaration space, regardless of whether ffi is local.