Four Taiwanese soldiers have been jailed for passing information to China in a case that analysts say shows the extent of Beijing’s infiltration of Taipei.