Update to work with the latest version of Rust, and add QuickCheck based testing.