A former NYPD captain said he faced retaliation after warning that the department’s vetting process could not be trusted.