Adding data passing to poll support on Windows

By using an in-memory linked-list data to be passed through a simulated pipe can
be passed. This is necessary to get hotplug infrastructure.
Don't cast to void pointer in safe_free

This has been generating some warnings with mingw-gcc, and it makes no sense
at all to cast to void a pointer, otherwise no static checks from the compiler
can be used.
Don't unreference usbi_default_context until it's about to be freed

If the user is running with the default context, then it seems to me that it's
expected that libusb can be debugged/traced up to the point were libusb_exit
has completed, which isn't possible unless usbi_default_context isn't set to
NULL until the call to free(ctx) is about to be called
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.
Hotplug for Windows

The work on this patch is based on several changes that make no sense to keep
separate.

* This code is based on 20e706f33a6 from [1], somethings had changed since then
  like making use of functions so there's no need to nest so much levels of code,
  original code was based on a very outdated libusb version, in order for this
  initial contribution to be used a few things needed to change:
  * Use htab_hash instead of usbi_hash
  * Remove no longer used variables
  * Every time it's possible prefer to asign values to an intermediate variable,
    to make code easier to read, and simpler to debug.
  * Adding a few needed function declarations
  * There's no context priv, so we can't keep a reference to it, as we don't need
    to maitain a reference to the hMessage variable anyway, there's no need for it.
* Introducing get_hotplug_device_node, this newly introduced method provides with
  a simpler way for creating only the necessary libusb structures related to the
  recently connected/disconnected device, so there's no need to renemurate all the buses.
  In order to decide if the device is know or not we can make use of the field dbcc_name
  from the dev_bdi structure, as this is the same string we pass to other win32 api
  methods.
* Introducing get_ancestor_session_path which let the consumer get the path
  string to one of it's ancestor devices.
* Implemented parent device filling automatically up to hcd level. In the case
  of hcd levels we resolve the vid and pid from the pci board and put those to
  the hub.
* Correct implementation of hotplug_poll, this method is used for initial
  polling, or every time get_device_list gets called, and refreshes the buses
  if there are any new devices. The way it works now is way simpler than before
  it firsts looks for all usb hubs, which get filled with they're parents hcd
  devices, then it looks for all usb devices which will fill up the tree up to
  the first known parent device, which turns out it's either a hub or a
  composite device.
Update implementation to match changes done to usbi_get_device_by_session_id

Now usbi_get_device_by_session_id increments the reference count on each call
to it, so we need to be more careful on releasing the allocated resources when
calling it, to avoid leaking memory. Method get_hotplug_device_node now has an
extra boolean argument named hotplug_poll which should be set to True only when
the function hotplug_poll is working, so if a device is all ready known in the
session it's reference count shouldn't be increased.

Conflicts:

	libusb/os/windows_usb.c
Use char instad of TCHAR
MSVS compatibility