Pointer and memory cleanup in FFI layer
- Fix small memory leak: store callback object in a
Pin<Box<_>>
in theServer
struct, rather than a raw pointer. - Remove several
mut
s to avoid breaking aliasing rules. - Change FFI function parameters to take pointers to callback targets, rather than pointers-as-ints.