Australia has signed a security treaty with Taiwan’s ally Tuvalu aimed at countering China’s influence in the Pacific.