Temperatures on the Great Barrier Reef have soared to their highest in 400 years, a new study has found.