A modern maximum likelihood theory for high-dimensional logistic regression