Ornstein-Uhlenbeck Adaptation as a Mechanism for Learning in Brains and Machines