[libc++][chrono] Applied `[[nodiscard]]` to `duration` (#174121)

`[[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/time.duration

Towards #172124

GitOrigin-RevId: 80cab521d0b8ec91e1b82b028215f2a6d07fe3aa
2 files changed