A federal judge has given preliminary approval to an agreement settling a class-action lawsuit over a D.C. law that banned inmates’ release from the city’s jail during the late evening and early morning hours.