Order parameters and phase transitions of continual learning in deep neural networks