autotools: don't compile linuxhooking on non-linux
ugtrain: prepare Windows support

We use the MinGW compiler to build for Windows.

The ugtrain compiles for Windows, now. But the Windows specific
functionality is not implemented, yet.

Changes:
* add Windows specific files
* implement stubs for Windows specific parts
* use %lu instead of %zd format specifier
* replace S_* flags with octal code for open() with O_CREATE
* deactivate FIFO handling for Windows
* define missing types and defines for Windows
* implement multi-platform sleep_sec() function