A 50-year-old man was rescued after an hours-long rescue operation in which he became trapped in a trench collapse at a construction site in Oxford.