devel/tevent: clamp far-future poll(2) timeout to avoid a busy-loop
When a timer is scheduled far enough in the future,
tvalp->tv_sec * 1000 overflows the int millisecond value that
poll_event_loop_poll() passes to poll(2). poll(2) then fails with
EINVAL and tevent spins in a busy-loop instead of sleeping. Clamp
the computed timeout to INT_MAX in that case.
PR: 297401
Approved by: 0mp (samba)
Sponsored by: Netzkommune GmbH