[native] restructure functions to be exposed across FFI boundary
Summary:
CXX doesn't have as much support for methods as I thought, so I'm changing the methods to normal functions that take an additional client param. We use a Box pointer because opaque Rust types can't be passed directly. I also removed all opaque Rust types from the return values of these functions.
Depends on D4935
Test Plan: cargo build, this is just a slight refactor even though it looks big
Reviewers: tomek, karol, atul
Reviewed By: tomek
Subscribers: ashoat, abosh
Differential Revision: https://phab.comm.dev/D4936