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
This would be more idiomatic as

```rust
if *x == uint::MAX { None }
else { Some(*x + 1) }
```

(i.e. explicit dereferences & dropping the `return`s that were there before.)