The two-year-old boy trapped in a well was rescued after more than 17 hours