The energy-speed-accuracy trade-off in sensory adaptation