debug: add proper const attribute to function arguments
Add proper const attribute to function arguments. Also
add format attribute to debug_fmt() function.
This fixes many warnings in many files, for example:
ssl_cli.c: In function ‘ssl_write_client_hello’:
ssl_cli.c:55: warning: passing argument 3 of
‘debug_print_msg’ discards qualifiers from pointer
target type
const attribute is added to function arguments and
variables in order to allow compiler checks with
-Wbad-function-cast, -Wcast-qual and
-Wwrite-strings warnings options.