Remove some unused things
Extract ffi_type_of()
Use ffi_type_of() for parameter types
Use lookup table for ffi types
Inline ffi_type_of