New script functions:
$CurWinType - returns the active window type.
$Target - Returns the current IRC target (channel or private msg)
Fixed some initializers for script engine which caused a crash.