Indonesia has agreed to repatriate a 69-year-old British woman who was on death row for trying to smuggle drugs into Bali.