src/coap_io.c: Fix re-transmission delays
src/coap_io.c: Fix re-transmission delays

There are 2 issues fixed here

Issue 1: In coap_write() (circa line 1074)
      if (XXXX && (s->last_rx_tx + session_timeout <= now || YYYY)) {
        coap_session_free(s);
      } else {
        if (XXXX) {
          coap_tick_t s_timeout = now - (s->last_rx_tx + session_timeout);

s_timeout will end up as a large number as 'now' is less than
(s->last_rx_tx + session_timeout)
Fix is to reverse the expression

Issue 2: In coap_write() (two places circa lines 1122 and 1136)
If coap_dtls_handle_timeout(s) causes the session to go away,
tls_timeout is set to 0, and so timeout does not get updated (could be 0
and so coap_write() returns 0 causing a wait for the default time in the
select() call.
Fix is to set timeout to 1 to cause a minimal time waiting in the select()

authmillenon/libcoap,authmillenon/libcoap,authmillenon/libcoap