c_vec: Modernize

Generally use more modern constructs (such as using `CVec::new()` as
constructor and move to more method usage).

Potentially controversial changes:
* change `get()` to return a reference instead of cloning
* remove `set()`, add `get_mut()` instead
* add an `unwrap()` method that destroys the CVec without running any
  associated destructor
auto merge of #10736 : Blei/rust/fix_c_vec, r=alexcrichton

Controversial change: make the constructors safe, but instead mark the
setters and getters as unsafe. This follows the tradition that construction
of *T is safe, but the access is unsafe instead.