Taiwan jostling with China to join coveted Pacific trade pact amid surging tensions