Add ykclient_global_init and ykclient_global_done.
Check for out of memory in ykclient_generate_nonce().
Remove and re-add easy handles to the multihandle on cleanup (this is confusingly documented requirement of libcurl)

Signed-off-by: Simon Josefsson <simon@josefsson.org>
We should check the state of the nonce we were passed, not the one in ykc
Quit early on OK. Continue processing after YKCLIENT_PARSE_ERROR and YKCLIENT_REPLAYED_REQUEST

Signed-off-by: Simon Josefsson <simon@josefsson.org>
Ignore .swp files

Signed-off-by: Simon Josefsson <simon@josefsson.org>
Cleanup ykclient_errors.h split.
Add versioning information to library.
Add implementation of versioning interface.
Call curl_multi_perform once more on cleanup
Leave it to the caller to cleanup the connection

The behaviour of the libcurl multi interface is not well documented.

One apparent issue is if you do not wait for all easy handle requests to complete and remove them from the multi handle, libcurl will immediately tear down the connection, sending a TCP RST to the server.

Assuming the calling application implements its own connection pool logic (as FreeRADIUS does), it can create multiple handles, and only cleanup when the handle is next used, by which time the transfer will of hopefully completed.
Call curl global init and curl global cleanup where appropriate
Add an option to ykclient utility to print out the version of curl it was linked to (for debugging)
Reduce indentation in parts of ykclient_request_send to make it easier to understand.