Learning threshold neurons via the "edge of stability"