A Memory-Augmented Neural Network Model of Abstract Rule Learning