Traffic on Dublin's M50 was brought to a standstill for several hours following the crash at Ballymount.