Clamp the current test frame index to be in a valid range. A valid range would be between 0 and the number of frames in the test data (anim sequence / ground truth). So if the test data contains 100 frames, so index 0..99, and we set the TestingFrameNumber member to 500, this method will turn that into 99.