High-efficiency ternary nonfullerene polymer solar cells with increased phase purity and reduced nonradiative energy loss