Change BoxIter to avoid trait objects

The introduction of object-safety for coercion to trait objects (see rust-lang/rfcs#255) affects the previous implementation of BoxIter. It turns out trait objects are not actually necessary to deal with this situation, so
the implementation was changed to be generic over the type of iterator instead of the type iterated over.