add #[experimental] as_string/as_vec functions

This provides a way to pass `&[T]` to functions taking `&T` where `T` is
a `Vec<U>`. It can be seen as an alternative to the `Equiv` trait, as it
handles all of the common cases well, without requiring a new trait and
new equiv methods. Methods like `find_with` on TreeMap taking a closure
with an equivalent `Ord` implementation are still useful.

Closes #14549