Change sendWithRetry() to always call ACKReceived at least once

Proper handling of retries==0 in sendWithRetry()
Added wait parameter to call to sendWithRetry()