libcore: Get rid of useless mem::forget wrapper.
auto merge of #16509 : luqmana/rust/uw, r=alexcrichton

Fixes #15401.