support a callback to intercept fprintf(stderr, into custom handlers

This simple change adds a nn_err_log_callback function to register a callback and receive error messages before the nanomsg library goes into an assert or an abort. This is useful to us as those messages are otherwise lost and not available on our application's crash logs.