net.c: fix possible derefence after null errors
net.c: fix possible derefence after null errors

Fix possible null pointer dereference in coap_get_context_server_hint()
and coap_get_context_server_psk().

These issues have been detected by Coverity scan as CIDs 1495725 and
1495729.

authmillenon/libcoap,authmillenon/libcoap,authmillenon/libcoap