dtls: abort handshake if the cookie is too long

We have reserved just 32 bytes for the cookie, abort if it is bigger
than that.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: add support for renegotiation

Now the server and the client are able to initiate and handle
renegotiation.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
test: make it possible to start TLS operations from the CLI

This patch makes it possible to close a connection from the client and
the server side and start a renegotiate from the server and the
client side by writing a special message into the client CLI.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
debug: fix length and error handling in dsrv_print_addr()

The returned length in dsrv_print_addr() was wrong and it was not
checked.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>