Maddrey’s resignation follows months of scandal and leadership turnover at the NYPD, the nation’s largest police department.