Adds support for return values and error results to #[bridge_callbacks],
and then provides the necessary extra *TypeInfo impls to support
KyberPreKeyStore.
This also drops the "lazy clone" optimization previously used by the
store, where a bridged handle owned by Rust can be "borrowed" by the
Swift side and then cloned if still alive when the callback is about
to complete. Now the value is cloned eagerly, and destroyed via Swift
regardless. This is unfortunate, but the Android bridge has never had
this optimization, and Android supports devices with worse
performance, so we should be able to live with it.
Wrap the raw pointers exposed across the bridge as named types that approximate
Swift's OpaquePointer?. Parameterize NativeHandleOwner with the native handle
type.
Only the iOS client ever used this extra parameter, and it's one
that's easily stored alongside the reference to a store. This is
massively simpler than having it threaded down to the Rust
libsignal_protocol and back up through the bridging layer.
This MP4 format "sanitizer" currently only transforms (when necessary) outgoing media on iOS, Android, or Desktop to
make it suitable for streaming playback by the recepient. In the future, it will validate and be able to either repair
or reject outbound AND inbound media, to prevent malformed media from being fed to third party or OS media players.
An generic io module was added to the libsignal rust bridge containing the InputStream trait, modeled loosely after
Java's InputStream, which calls back into the client language to perform reads or skips. This infrastructure could
potentially also be for any other future large data inputs to libsignal functions.
...which handles enum variants slightly differently under the
configuration options we have ('remove_underscores', relevant for
generic types rather than enum variants). The new style is closer to
Apple-idiomatic anyway.