Greece has agreed terms with its creditors - but is the ultimate cost being met by democracy, asks Jonathan Hopkin