Greece reached a desperately-needed bailout deal with the eurozone on Monday after marathon overnight talks, in a historic agreement to prevent the country crashing out of the European single currency.