Leaders of the eurozone countries have reached a new agreement on tackling the Greek debt crisis, at a summit in Brussels.