change ~[] -> Vec for collect()

This updates the documentation for result::collect() and
option::collect() to use the new-style syntax for vectors, instead of
the old ~[].

closes #14991