Function for interoperability with C style thrid party libraries

Add support for a from_C and to_C functions that help dealign with C liike third party libraries so we can share C style pointer or trnasfer ownership of container's memory to C function.