Update for latest rustc

std::util::replace is now std::mem::replace.
treemap is now in libcollections.