Rule-based learning explains visual perceptual learning and its specificity and transfer