Return negative for UnscheduleEvent().

It usually won't be, but it could be negative.

Also some other minor warnings.
Fix some small constant-comparison type warnings.