Use &'static Encoding instead of ~Encoding (Rust 0.8-pre)

This builds on top of #10 and a port to a recent version of Rust. (The borrow checker is being silly on 0.7.)