rt: Add RUST_DEBUG_MEM to rust_env to avoid races
auto merge of #5342 : brson/rust/debug-mem, r=brson

Fixes #5341
option: rm functions that duplicate methods