Add VecRef to std::vec

This adds a `VecRef` that can hold either a ~[T] or a &'static [T]
Implement a StringRef

This is the string equivalent of VecRef. I had some trouble with
lifetimes trying to implement StrSlice, so I've left it for now,
iterating on strings isn't as common and the .as_slice() method
merely means you need to add an extra method call.
auto merge of #7599 : Aatch/rust/vec-ref, r=huonw

Adds types for representing either a static string/vector or an owned string/vector.

The vector implements most convenience methods available to other vectors, and the rest can be accessed via the .as_slice() method.

I ran into some issues with the string implementation trying to implement `StrSlice` on it, since the borrow checker has difficulty relating the lifetimes. All the standard methods are still available via the .as_slice() method, as before.

Both implementations have methods for converting to an owned version, and both have a `to_owned_consume` that consumes the type and only does an allocation if necessary.

Closes #6874

----

PS: I'm not sure on the names, if anybody has any better suggestions, I'm happy to change them.