Rust: remove direct dependency on the `libc` crate
Almost all uses of the libc crate were to import types that the standard library already provides, e.g. c_void, c_char, etc. We can import those from std::ffi. In some places they were being imported from std::os::raw, so I changed those imports as well, as they are just type aliases for the definitions in std::ffi anyways.
One nontrivial case where libc was being used was inside cb_{free_}flag_conditions_for_semantic_flag_group, which used libc::{malloc, free}. This was changed to use std::alloc::{alloc, dealloc} and required some hacky layout calculations in order to smuggle the length of the allocated array across the FFI boundary.
Getting rid of this hack would require for the Core API to change such that a count: usize parameter is passed to cb_free_flag_conditions_for_semantic_flag_group (and ideally also to cb_free_register_list) so that no smuggling would be required and we could just call Box::from_raw(ptr::slice_from_raw_parts_mut(conds, count)) and be done. I'll open a separate issue for that.