Refactored Dirichlet MLE -- allow also allows input either a matrix of samples or pre-computed E[log p].