N.J. Democrat sheriff resigns after caught on tape using bigoted slurs