cleaned up memory allocation in inverseKinBackend (following cleanup in NonlinearProgramSnoptmex).  there was a lot of (unnecessary) dynamic allocation going on in here. ik might have just gotten faster