Changed condition variable API so that XP would work

The condition variable shim used Windows APIs that were only supported by Vista+. This patch rewrites the condition variable shim using APIs that are also supported on XP.

In order to fix a bug with using the Windows Event APIs, reading from USB is now done using the `AdbReadEndpointAsync` function.