The freight-sector bellwether’s profit improved slightly even though revenue in its core intermodal business declined.