Work around #8256, do not fail the task, just return None
Open files in binary mode. Closes #3948
Updated std::Option, std::Either and std::Result

- Made naming schemes consistent between Option, Result and Either
- Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
auto merge of #8298 : darkf/rust/fix-3948, r=pcwalton
auto merge of #8288 : Kimundi/rust/opteitres4, r=brson

This is an alternative version to https://github.com/mozilla/rust/pull/8268, where instead of transitioning to `get()` completely, I transitioned to `unwrap()` completely.

My reasoning for also opening this PR is that having two different functions with identical behavior on a common datatype is bad for consistency and confusing for users, and should be solved as soon as possible. The fact that apparently half the code uses `get()`, and the other half `unwrap()` only makes it worse.

If the final naming decision ends up different, there needs to be a big renaming anyway, but until then it should at least be consistent.

---

- Made naming schemes consistent between Option, Result and Either
- Lifted the quality of the either and result module to that of option
- Changed Options Add implementation to work like the maybe Monad (return None if any of the inputs is None)  
  See https://github.com/mozilla/rust/issues/6002, especially my last comment.
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead  
  See also https://github.com/mozilla/rust/issues/7887.

Todo: 

Adding testcases for all function in the three modules. Even without the few functions I added, the coverage wasn't complete to begin with. But I'd rather do that as a follow up PR, I've touched to much code here already, need to go through them again later.
std: Add .consume_iter() for Option, to make it reusable

Let Option be a base for a widely useful one- or zero- item iterator.
Refactor OptionIterator to support any generic element type, so the same
iterator impl can be used for both &T, &mut T and T iterators.
std: Convert Result to use external iterators

convert iter() and iter_err() for Result. Use OptionIterator.
std: Remove unused trait bound in Result::map
std: Implement RandomAccessIterator for Invert
std: Improve vec::ChunkIter

Implement clone, bidirectionality and random access for this iterator
std: Add iterator::Repeat to repeat an element endlessly
std: Rewrite the HashSet set operation iterators

Use the Repeat iterator to carry the "explicit closure capture" that was
previously done with the custom EnvFilterIterator.
std: Use method name Option::consume

With Option as the simplest container, `consume` is the way to turn it
into a by-value iterator.
std: Improve the documentation for iterator::Invert
extra: Simplify the bitv iterators using Repeat
std: Remove uint::iterate, replaced by `range`
std: Fix bug in ChunkIter::idx

ChunkIter .idx() didn't handle overflow correctly, even though it tried.
auto merge of #8278 : cmr/rust/workaround, r=brson
auto merge of #8265 : blake2-ppc/rust/std-iter, r=thestinger

Fix #8228 by replacing .iter() and .iter_err() in Result by external iterators.

Implement random access for `iterator::Invert` and `vec::ChunkIter` (and bidirectionality).

Implement Repeat iterator.