Fix(?) build with rust master

The first 2 commits are simple adjustments to std library changes. 

The last one attempts to fix the `Box<Iterator> not object-safe` problem. This compiles and _seems_ to work, though I'd not be surprised if this actually breaks in some way (the types/lifetimes are more or less the result of a brute-force attack against the compiler).