compile on nightly rust

`std::str` module stabilization broke this package..
Here are the fixes.

* [`CharOffsets` was renamed](https://github.com/rust-lang/rust/commit/4908017d59da8694b9ceaf743baf1163c1e19086)
* [`from_str` was deprecated](https://github.com/rust-lang/rust/commit/4908017d59da8694b9ceaf743baf1163c1e19086#diff-217697ea90c99f938acf109e919a761dR50)

these fix the tests as well

PS: I'm new to rust, please read carefully before merging.