Update for Rust master

HashMap moved to collections crate, use std::from_str::FromStr, and convert implementation of ToStr to fmt::Show implementation.
Merge pull request #40 from cacteye/patch-1

Update for Rust master