Lionel Messi scored twice as Inter Miami cruised to a 4-0 win over New York City FC to secure a spot in the MLS postseason.