change ~[] -> Vec for collect()

This updates the documentation for result::collect() and
option::collect() to use the new-style syntax for owned pointers and
vectors.

closes #14991
Updated as noted. Thanks for the style tip.