It works.  I was off by a factor of 2 in my first derivatives for the off-diagonal elements of X.  It finally actually works.  I'm not happy that it takes 13 iterations, but that's requireing 1e-10 tolerance.  There are also serious problems with the loglikelihood.  Thi may be a design issue, but I'm getting to the right place with gradient descent, even though my loglikelihood is definitely higher at the starting point than at the endpoint.