Handle joints which contain only a single keyframe

The engine expects all joints to have at absolute minimum 2 keyframes,
in order to determine whether or not the current action for that joint
should be looping. Combined the logic for 0 and 1 keyframe joints, to
always include the joint's state at the first and last frames of the
animation, and possible one more in the middle if the joint's single
keyframe was mid-animation. This should result in either 2 or 3
identical keyframes for said joint, with the exception of time.