[Win] Reduce duplication in device enumeration
[Win] Completed raw input IJoystickDriver2

For improved safety, we are now using managed memory buffers instead of
stack allocations and pointers.