A federal judge dismissed a class-action lawsuit that accused Cuyahoga County of routinely holding inmates past their legal release dates.