Americans paid more for their groceries last month, but high gasoline prices resulting from the Iran war were only one of the reasons why.