Edinburgh University plans to reduce staff numbers to plug a £140 million financial black hole.