Fix for current nightly

[The `~` syntax is going away](https://github.com/mozilla/rust/pull/13958), and most of it was already removed (with the exception of `~str` and `~[]`). This PR changes the current uses of `~T` to `Box<T>`, making the library compilable (and the tests pass) on the current (May 8th 2014) nightly.

Also, there were a few uses of `~[]` that were unnecessary - the `[]` literal already returns a `&'static [T]`, which is enough for many (most?) uses where the vector doesn't need to be changed. This avoids a heap allocation.

**Update**: I think travis' `rustc` is older than the current nightly, causing the build failure. For the record, the version I used to build and test this is mozilla/rust@c4f0980