delphi: Reset TimedSemaphore event in all cases if available gets zero
delphi: Add TEventWrapper to handle platform specific event APIs