Avoid direct usage of FFIProvider interface, and make failure to load more robust.
Add annotations to optimize copying data in to/out of native code, and correct length parameters to be unsigned long long