Refactored take_unwrap (libstd/option.rs)

Using pattern matching instead of is_some + unwrap
auto merge of #12931 : aochagavia/rust/option-take_unwrap, r=cmr

Using pattern matching instead of is_some + unwrap