rust / build: make install should use explicit permissions when creating directories

Closes #10046
Remove ancient emacs mode lines from test cases

These are relics that serve no purpose.
auto merge of #10048 : ibukanov/rust/mkdir-fix, r=brson

The patch replaces mkdir -p dir with (umask 022 && mkdir -p dir). Sadly mkdir -m 755 -p dir does not work if it creates parent directories as those parents will have umask permissions, not the one passed with -m option.   

Closes #10046
auto merge of #10072 : brson/rust/modelines, r=thestinger

These are relics that serve no purpose.
Made Option and Results methods more similar, restructured
their source layout.

- Renamed the `Result` methods on `Err` values from `NAME_err`
  to `err_NAME` to make the methods flow better into the argument.
  Compare `res.err_unwrap_or(foo)` and `res.unwrap_or_err(foo)`
- Renamed `map_default` to `map_or` to make it more similar to the
  boolean-logic-like naming conventions already in use, and to
  make it not confusing in regard to the `Default` trait.
  Instead, there could be `NAME_default` methods that use that trait.
- Added more methods on `Result` to make it equal with `Option` for
  non-option-specific operations.
- Added a `sys::FailWithCause` impl for
  `<C: FailWithCause> &fn() -> C` that calls the closure to
  compute the fail cause, and made `expect()`'s custom
  fail message generic over `FailWithCause`. This enables lazy
  evaluation of a failure message, while still allowing to pass a
  `&'static str` without additional overhead.
  Example: `None.expect("static str message")` vs
  `None.expect(|| format!("Expensive to compute allocating error message
  with {}. ", expensive_calculation()))`