coap_gnutls.c: Fix out-of-bounds array access
coap_gnutls.c: Fix out-of-bounds array access

Coverity scan found an out-of-bounds array access while reading the local array identity
(CID 1476518). This change also ensures that the result parameters are always initialized
and avoids invalid pointer dereference in case gnutls_malloc() returns NULL.

authmillenon/libcoap,authmillenon/libcoap,authmillenon/libcoap