Implement ToJson for Vec<T>

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