Glasgow City Council and Labour have ended their legal dispute over a councillor who was barred from office just four days after being elected.