Implement ToJson for Vec<T>

Now that ~[T] is obsolete, we need to allow to_json() to work for
vectors.
auto merge of #13891 : hjr3/rust/serialize-vec, r=pcwalton

Now that ~[T] is obsolete, we need to allow to_json() to work for
vectors.