Beta-binomial gradient with respect to its pi parameter; for internal use by C++

GradPi_cppi(M, N, PI, THETA, MemLim, Xtra)