Improved Likelihood calculation stability.

I have updated the procedure to calculate the likelihood to be more robust to thread level concurrency.  To accelerate likelihood calculation we now precompute the log gamma function for frequent values.

Evaluating on NIPS data now shows a steady increase in log-likelihood over time.