Fix some non-FFI-safe types in externs
Use a visitor to look for non-FFI-safe types

Fixes #16250.
auto merge of #16981 : kmcallister/rust/ctypes-warning, r=alexcrichton