Brazil’s geography and colonial history meant that it has traditionally looked to the Atlantic for commerce. Now it’s deepening ties with the Asia Pacific.