Theory of solar cell light trapping through a nonequilibrium Green's function formulation of Maxwell's equations