Curve::getNearestKeyFrameWithTime: fix bug (iterator used outside of its scope) + rewrite
fix a few warnings / potential bugs