fix: scanner: Increase time getting measurements
- Increase the time waiting for the last measurements queued, to avoid canceling unfinished measurements and gc maybe not releasing thread variables
- Use the already declared global pool instead of passing it by args
- Log more information when the last measuremetns timeout
Closes: #40087 (closed)