Fix evaluation of discontinuous timing functions when in backwards fill 

Currently, when a step timing function is evaluated at a discontinuity, the result is always the 'after step' value. This is true regardless of the TimedItem's phase.

In particular (with startIteration=0), this means that when a TimedItem with a step-start timing function is in backwards fill, the time fraction will be non-zero. This violates the expectation that a TimedItem is always at the 'start' when in backwards fill. This expectation holds for all non step-start timing functions.

This change uses the TimedItem's phase when evaluating the timing function to determine on which 'side' of the discontinuity the timing function should be evaluated. We use the -ve side when in backwards fill and the +ve side otherwise.