Make current loglevel and current log callback global
to the library. Attaching them to the nsock pool doesn't
bring any benefit and prevents from logging activity in
code sections that don't have access to a pool (such as
proxy chain specification parsing).
Updated external calls and nsock tests accordingly.
This fixes a really bad bug that seems to have been there for a while. Canceling
a nsock connect SSL operation fails with fatal(). I have never seen it in real
life though.
Added a corresponding unit test.