Codegen: Combine two PointerCasts into one

Shaves off a percent or so from the LLVM passes for librustc.
fix the ptr::set_memory docstring
fix the docstring for copy_nonoverlapping_memory
Iterator documentation fixes

Fixes two typos and one incorrect description.
std: convert {vec,str}::to_owned to methods.
std: replace str::append with a method
std: convert str::repeat to a method.
std: convert str::{*shift,pop}* to methods.
std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume]().

The first acts on &str and is not nul-terminated, the last two act on strings
that are always null terminated (&'static str, ~str and @str).
std: add a test for HashMap::find_equiv.
std: remove substr & str::count_*, methodise char_len, implement slice_chars.

The confusing mixture of byte index and character count meant that every
use of .substr was incorrect; replaced by slice_chars which only uses
character indices. The old behaviour of `.substr(start, n)` can be emulated
via `.slice_from(start).slice_chars(0, n)`.
std: methodise str::capacity
std: convert str::replace to a method.
std: convert str::escape_* to methods.
std: create Str trait for DRY. Use it on StrVector.

The Str trait collects the various strings types and provides a method
for coercing to a slice, so that functions and impls can be written for
generic types containing strings (e.g. &[~str], &[&str], ...) without
having to write one for each string type (assuming that the impl only
needs a slice).
std: generalise .trim_chars to use CharEq.
Silence some warnings.
std: fix method renaming.
std: fix windows
auto merge of #7069 : dotdash/rust/cast_combine, r=graydon

Shaves off a percent or so from the LLVM passes for librustc.