Make tests aware of HAVE_CONFIG_H

IMHO the idea of having a configuration file header is to avoid having to pass
define arguments to the compiler, by making tests/testlib.c be aware of the
configuration file, we can avoid having to add more checks to the list.

This was necessary to avoid having to add more arguments when building with
mingw.
Move some windows_usb methods from headers into source

This change allows to step debug some methods as gdb and other tools are not
able to debug as this methods get optimized.
Improve windows_usb.h

* Sanitize _device_priv, make sure device is not NULL before trying to access
  os_priv member.
* Use SetupDiGetClassDevsExA from setupapi
* PCTSTR is not defined with mingw compiler, and maybe with some others, this
  definition has been carbon copied from MSDN.