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
The convention is for functions to be used module-qualified, i.e. import `std::option` and call `option::collect`.