core: inlining on common functions
libcore: optimize string joining routines.

This makes concat/connect/connect_slices about 20% faster, and takes
`repeat` from O(n^2) to O(n), and lowers the constant factor.
auto merge of #6182 : huonw/rust/core-str-opts, r=nikomatsakis

This adds #[inline] to many very common string routines (e.g. `len`).

It also rewrites `repeat` to not use `+=` and make it O(n) rather than O(n^2), and also concat/connect(_slices) to reduce the overhead of reallocations, and constantly `set_len`ing (etc) in `push_str`. (The added complexity might not be worth the 20% speedup though.)