The agreement requires the online retail giant to end practices that California’s attorney general said concealed Covid case counts.