Improve performance for contextual validations
Improve performance for contextual validations

This change reduces retained memory when registering contextual
validations, and reduces overhead when running contextual validations.

Benchmark script:

```ruby
require "benchmark/memory"
require "benchmark/ips"

class Post
  include ActiveModel::Validations

  def foo; end
  def bar; end
end

class Comment
  include ActiveModel::Validations

  def foo; end
  def bar; end
end

Benchmark.memory do |x|
  x.report("warmup") do
    Post.validate :will_not_be_called, on: :warmup
    Comment.validate :will_not_be_called, on: :warmup
  end

  x.report("register validations") do
    Post.validate :foo, on: :create
    Post.validate :bar, on: :update
    Comment.validate :foo, on: :create
    Comment.validate :bar, on: :update
  end
end

post = Post.new

Benchmark.ips do |x|
  x.report("run validations") do
    post.valid?(:create)
  end
end
```

Before:

```
Calculating -------------------------------------
              warmup     3.320k memsize (     1.552k retained)
                        48.000  objects (    21.000  retained)
                         0.000  strings (     0.000  retained)
register validations     5.856k memsize (     2.456k retained)
                        92.000  objects (    33.000  retained)
                         0.000  strings (     0.000  retained)
Warming up --------------------------------------
     run validations     6.232k i/100ms
Calculating -------------------------------------
     run validations     61.826k (± 0.7%) i/s -    311.600k in   5.040176s
```

After:

```
Calculating -------------------------------------
              warmup     3.960k memsize (     1.400k retained)
                        51.000  objects (    17.000  retained)
                         0.000  strings (     0.000  retained)
register validations     6.368k memsize (     1.384k retained)
                        94.000  objects (    21.000  retained)
                         0.000  strings (     0.000  retained)
Warming up --------------------------------------
     run validations     6.998k i/100ms
Calculating -------------------------------------
     run validations     70.741k (± 0.6%) i/s -    356.898k in   5.045347s
```

Erol/rails,yawboakye/rails,yahonda/rails,yawboakye/rails,yahonda/rails,yawboakye/rails,esparta/rails,esparta/rails,georgeclaghorn/rails,esparta/rails,Erol/rails,rails/rails,BlakeWilliams/rails,yahonda/rails,BlakeWilliams/rails,rails/rails,georgeclaghorn/rails,MSP-Greg/rails,kmcphillips/rails,MSP-Greg/rails,esparta/rails,kmcphillips/rails,rails/rails,yahonda/rails,georgeclaghorn/rails,kmcphillips/rails,MSP-Greg/rails,rails/rails,yawboakye/rails,BlakeWilliams/rails,Erol/rails,kmcphillips/rails,Erol/rails,MSP-Greg/rails,georgeclaghorn/rails,BlakeWilliams/rails