C API helper functinos for Rust

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

See crates.io.