The Hong Kong-based conglomerate that operates ports near the Panama Canal has agreed to sell shares of its units that operate the ports to a consortium including BlackRock Inc.