Insert fcurve keyframe point whilst keeping curve shape
Subdividing Bezier curves is normally done using De Casteljau's algorithm.  However, fcurves aren't pure Bezier curves.  It is not hard to make a bezier curve "run backwards" along the time axis.  Since this would create ambiguities in the animation system, blender prevents that by using modified handle coordinates whenever the handles could make the curve backtrack in the time axis.  Once we understand that math, we have what is needed to properly subdivide the fcurve.

The solution is already covered at https://blender.stackexchange.com/a/57453/660 .  It includes an excerpt from http://web.purplefrog.com/~thoth/blender/python-cookbook/subdivide-fcurve.html .  I got bored and added the logic needed to map from frame->t so it should now be a fairly complete solution.  I'm not copying the code over here, because keeping it up-to-date in both articles on stackexchange is tedious.