Tweak region inference to ignore constraints like 'a <= 'static, since they
have no value. This also ensures that we can handle some obscure cases of fn
subtyping with bound regions that we didn't used to handle correctly.

Fixes #13974.
define Eq,TotalEq,Ord,TotalOrd for &mut T

Also Show, which is useful in assertions. Fixes #14074
Optimize common path of Once::doit

Optimize `Once::doit`: perform optimistic check that initializtion is
already completed.  `load` is much cheaper than `fetch_add` at least
on x86_64.

Verified with this test:

```
static mut o: one::Once = one::ONCE_INIT;
unsafe {
    loop {
        let start = time::precise_time_ns();
        let iters = 50000000u64;
        for _ in range(0, iters) {
            o.doit(|| { println!("once!"); });
        }
        let end = time::precise_time_ns();
        let ps_per_iter = 1000 * (end - start) / iters;
        println!("{} ps per iter", ps_per_iter);

        // confuse the optimizer
        o.doit(|| { println!("once!"); });
    }
}
```

Test executed on Mac, Intel Core i7 2GHz. Result is:
* 20ns per iteration without patch
*  4ns per iteration with this patch applied

Once.doit could be even faster (800ps per iteration), if `doit` function
was split into a pair of `doit`/`doit_slow`, and `doit` marked as
`#[inline]` like this:

```
#[inline(always)]
pub fn doit(&self, f: ||) {
    if self.cnt.load(atomics::SeqCst) < 0 {
        return
    }

    self.doit_slow(f);
}

fn doit_slow(&self, f: ||) { ... }
```
Reinstate HashMap.mangle().

This was removed when the Robin Hood hash map came along, but it is a
useful thing to have.

The comment is taken directly from what was there before (e.g. in 0.9)
but with appropriate language changes (like `StrBuf` instead of `~str`).
update valgrind headers
test: Remove all uses of `~str` from the test suite.
libworkcache: Remove all uses of `~str` from `libworkcache`.
libuuid: Remove all uses of `~str` from `libuuid`.
libhexfloat: Remove all uses of `~str` from `libhexfloat`
libarena: Remove all uses of `~str` from `libarena`
Added substring searching benchmarks.

test str::bench::bench_contains_bad_naive                   ... bench:      1309 ns/iter (+/- 36)
test str::bench::bench_contains_equal                       ... bench:       137 ns/iter (+/- 2)
test str::bench::bench_contains_short_long                  ... bench:      5473 ns/iter (+/- 14)
test str::bench::bench_contains_short_short                 ... bench:        57 ns/iter (+/- 6)
Print 'rustc' and 'rustdoc' as the command name for --version

Instead of just blindly printing arg[0], use a constant string.
Partial fix for #13582
Tidy up the HashMap.mangle example.
Rename HashMap.mangle to find_with_or_insert_with.

This also entails swapping the order of the find and insert callbacks so
that their order matches the order of the terms in the method name.
Use assertions in find_with_or_insert_with example

This lets us test it automatically and also makes it more obvious what
the expected result is.
Change str::from_utf8_owned() to return Result

This allows the original vector to be recovered in the event that it is
not valid UTF-8.

[breaking-change]
Change StrBuf::from_utf8() to return Result

This allows the original vector to be recovered in the event that it is
not UTF-8.

[breaking-change]
libregex: Remove all uses of `~str` from `libregex`
libgraphviz: Remove all uses of `~str` from `libgraphviz`.
liblog: Remove all uses of `~str` from `liblog`