Reimplement encoding and decoding in Rust

./test.sh before:

6.38user 1.12system 0:06.13elapsed 122%CPU (0avgtext+0avgdata 83812maxresident)k
0inputs+66096outputs (0major+148826minor)pagefaults 0swaps

./test.sh after:

2.95user 0.97system 0:03.33elapsed 117%CPU (0avgtext+0avgdata 83920maxresident)k
0inputs+66040outputs (0major+137717minor)pagefaults 0swaps
Update .travis.yml to (hopefully) work with Rust