[core] more refactoring

* Use PF_ calls everywhere
* Add libwdi_i.h header
* Fix a possible Zadig crash when device description is empty
* Also set default Zadig log level to debug
* Also fix a MinGW32 build issue
[misc] fix coverity warnings

* Also improve error reporting
* Also add libwdi_i.h to DLL project