libstd: Implement some convenience methods on vectors
auto merge of #12253 : pcwalton/rust/more-vec-ng, r=alexcrichton

r? @brson