MF-OMO: An Optimization Formulation of Mean-Field Games