Lebanese factions broker deal in Qatar