[libc++][ranges]  Applied `[[nodiscard]]` to `single_view` (#173709)

`[[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.single

Towards #172124

GitOrigin-RevId: 4c0360753e7734994349f57385cf868efd4aa84b
2 files changed