nanocoap_sock: split generic request function of from nanocoap_get
The nanocoap_get function is refactored to split of the request part into a separate function for reuse by other modules. Support for retransmissions when the received frame is malformed is dropped as it was broken anyway.