Implicit bias produces neural scaling laws in learning curves, from perceptrons to deep networks