The Philippines's transformation into a unlikely regional powerhouse in renewable energy hasn't been easy.