Former Greenfield Police officer wins discrimination lawsuit against city