core: Don't overwrite the log callback on every global libusb_set_option()

But set it only on option LIBUSB_OPTION_LOG_CB.

Otherwise the following second call resets the callback to the
default one:

 libusb_set_option(NULL, LIBUSB_OPTION_LOG_CB, cb_func);
 libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_DEBUG);

References #1397
2 files changed