Lucas di Grassi wins first Formula E race in dramatic fashion