On the Ability of Deep Networks to Learn Symmetries from Data: A Neural Kernel Theory