A Mandarin class in San Marino, Calif., and others like it in the U.S. and Europe are backed by the Taiwanese government, which hopes to spread its version of Mandarin — along with its values of freedom and democracy — as China’s threats against Taiwan become increasingly bellicose.