European markets have given a weary cheer as eurozone leaders emerged from all night talks in Brussels with a deal to keep Greece afloat.