C API helper functinos for Rust

Helper functions for letting C programs create and free objects in Rust libraries.

NB: This will be obsolete once Box::fromraw/intoraw are stable.

See crates.io.