Artificial intelligence is transforming middle-class jobs. Can it also help the poor?