cut - get rid of unsafe indexing

Unsafe indexing is replaced by ImmutableEqVector::position_elem() and a
few branches have been eliminated.

The performance is about the same as for unsafe indexing.

I actually did a couple of refractors and a few times there was a significant performance loss if I used the position_elem function and this could be fixed if I used a custom version without closures. This leads me to believe that there might still be some performance gain when closures inlining gets better.

Maybe someone knows (or is able to check) if the closure in [`ImmutableEqVector<T> for &'a [T]`'s `position_elem`](https://github.com/rust-lang/rust/blob/e9e5ea2f903ed780e0bbbe5f5662a5ee2054c4a2/src/libcore/slice.rs#L762) is currently being inlined?