In the face of uncertain markets and policies, solar panel makers are ramping up factories in hopes of driving costs down to a competitive level.