[libc++][ranges] Applied `[[nodiscard]]` to `filter_view` (#173460)

`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.

- https://libcxx.llvm.org/CodingGuidelines.html
- https://wg21.link/range.filter

Towards #172124

GitOrigin-RevId: 3b31f8ca1aa76f03db7146109da0b436fe54ef26
2 files changed