Thousands of U.S.-bound Cuban migrants are heading to Mexico as part of a deal with Panama.