Clamp lastTime to endTime

Currently, for a non-looping animation, lastTime is not clamped to the length of the animation but time is.  This means then when applying an animation, time could be less than lastTime and this in turn can lead
to all events in the animation being fired every frame, when the animation has reached the end.

This commit clamps the lastTime in a similar manner to the time, when applying animations.

This is only fixed in the spine-c runtime, as I'm not in a position to test the others.  I did notice that the same issue will occur in other runtimes however.