Ireland and Portugal are closing a visa scheme for wealthy foreign investors. The UK did the same last year. The “residence by investment” program, or “golden visa program,” has been popular among Chinese millionaires, but the European Union warned there could be security risks.