Update previous hash

Update the previous hash during `yz_events` tick. Otherwise
`sync_indexes` will be called on every tick which could be expensive.
Fix off by one error for event tick

Start NumTicks at 1 so that it actually does full check at N seconds
rather than N+1.
Add MAYBE macro

Add MAYBE macro that conditionally evaluates expression based on another
expression. It can be used to reduce lines of code where you would
usually use a case expression to match against a boolean.

Use the MAYBE macro in event tick to clean up code a bit.
Merge pull request #311 from basho/bugfix/rz/full-check

Update previous hash during event tick + general refactoring