The policy in one of the world’s largest cities is a test case for whether solar power makes sense on urban rooftops.