Fixes #740 - Make sure callbacks exist before marking them as 'handled'.
Merge pull request #741 from mstuart/master

Fixes #740 - Make sure callbacks exist before marking them as 'handled'.
Add --env cli flag (ref #692)
Merge pull request #745 from btmills/env-flag

Add --env cli flag (ref #692)
fixes #735: add new, more efficient getTokens interfaces

This is a combination of 6 commits.
The first commit's message is:

add getTokensBefore and getTokensAfter interfaces (ref #735)

This is the 2nd commit message:

add getTokenBefore and getTokenAfter interfaces (ref #735)

This is the 3rd commit message:

add getFirstTokens and getLastTokens interfaces (ref #735)

This is the 4th commit message:

add getFirstToken and getLastToken interfaces (ref #735)

This is the 5th commit message:

expose new getTokens methods to rule context object

This is the 6th commit message:

make use of new getTokens methods in rules