[c-ffi] Add a new error-condition result type.

This helps writing better wrappers for C libraries where the
return value is used to signal if the function did error.