Fixed PID host change issue.
Code cleanup.

-Made Scheduler and Scheduler for Windows code less divergent.
Avoided usage of %PID variable as suggested by Perl::Critic.
Made signal variables local as suggested by Perl::Critic.
Code cleanup.

-Made Win32::Deamon functions calls more explicit.
Followup for bug#10340 - Dynamic field not visible in queue view screen (AgentTicketOverviewSmall.dtl).
Followup for bug#[10130](http://bugs.otrs.org/show_bug.cgi?id=10130) - Events Ticket Calendar not working.