MixedMeasuredBlockState: Improve numerical stability

Use gammaln() in place of log(gamma()).
6 jobs for master in 353 minutes and 58 seconds (queued for 3 seconds)