Microscopic nonequilibrium theory of quantum well solar cells