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
I personally prefer the closure form, rather than `inc_conditionally` taking a reference, since I think it's clearer what is happening.