A Carnival Cruise ship stranded off the Mexican coast has been rescued by the Coast Guard.