Replace ~ with Box and box where appropriate

With this commit, the code compiles with the latest Rust version.
Bring code up to date with local_data API changes
Merge pull request #151 from hannobraun/rust-upgrade

Upgrade to latest Rust