Silicon Valley’s belief that it can optimize society goes back a long way, as Jill Lepore argues in her new book “If Then.”