For nearly two years, officers used questionable tactics to arrest women for prostitution. Then the cases fell apart.