Fixes a Windows 64-bit compile error relating to Windows.SetTimer()

The TIMERPROC signature has changed between FPC 2.6.0 and 2.6.2. This
minor changes now supports both compiler versions. I tested this under
32-bit and 64-bit FPC.
debug: replaced debug writeln() statements with SendDebug() calls.

Debugging with the debug server is much easier than looking at command line
output.
Adds CP1251 to UTF8 encoding conversion