A surge in new solar capacity is flooding the grid with power, pushing prices below zero, squeezing renewable profits, and deterring some investors.