This test does not test anything that happens in the real world.  If you
recreate the models without mucking with internal caches of the relation
objects, then the test fails.

For example:

class Man < ActiveRecord::Base
  has_many :interests
end

class Interest < ActiveRecord::Base
  belongs_to :man
end

Then do this test:

def test_validate_presence_of_parent_fails_without_inverse_of
  repair_validations(Interest) do
    Interest.validates_presence_of(:man)
    assert_no_difference ['Man.count', 'Interest.count'] do
      man = Man.create(:name => 'John',
                       :interests_attributes => [{:topic=>'Cars'}, {:topic=>'Sports'}])
      assert_not_predicate man.errors[:"interests.man"], :empty?
    end
  end
end

The test will fail.  This is a bad test, so I am removing it.
these methods are never called, so remove them
only cache the primary key column in one place
calculate types on construction
table name is cached on the class, so stop caching twice
quoted table name is also cached
 `initialize_on_precompile` is not used anymore.
Merge pull request #10833 from hone/remove_initialize_on_precompile

`initialize_on_precompile` is not used anymore.