Include frequency=0 in illegal frequency check
Clear pending IRQ before "start()" re-enables IRQ

This change prevents the event handler from being called immediately if
there is a pending interrupt (because a period has elapsed) when calling
start.
Merge pull request #9 from feilb/master

Add frequency=0 check; Fix bug where handler is called immediately on start()