AI on the Road: A Comprehensive Analysis of Traffic Accidents and Accident Detection System in Smart Cities