India’s $500 million port deal with Iran is a masterstroke—and a tough balancing act