Upgrade code and libraries to latest Rust

std::str changes, and the way macros are expanded.