Maximum likelihood estimation of magnitude-squared multiple and ordinary coherence