The Philippines has ratified a defence treaty with Japan, allowing the country to station troops on each others territory for military exercises after growing territorial challenges from China.