Oakland’s top bureaucrat quit in disgrace over private messages filled with sexually suggestive comments about female colleagues.