CLEARWATER: CA-107115: Xapi_period_scheduler: fall back to Thread.delay if Delay.wait fails

Duplicate of #1268 for clearwater.