The write-cost bottleneck: energy constraints on continual learning in brains and machines