Fixed missing update in ODE event handlers.

When a RESET_STATE was triggered, event states for events not triggered
in the same step were not updated properly.

JIRA: MATH-950

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1458294 13f79535-47bb-0310-9956-ffa450edef68
Added a way to trigger only increasing or decreasing events in ODE.

The method used is completely different from what was suggested in the
request report. It is fully compatible with previous versions and most
importantly has no side effects on users that do not need this feature,
as it is based on an upstream filtering of the event definition
function. The events detection logic is not modified and it fact it does
not even know events are filtered before they are detected.

JIRA: MATH-811

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1458298 13f79535-47bb-0310-9956-ffa450edef68