Maximum Likelihood for Matrices with Rank Constraints