Allow deep inheritance of ActiveRecord::Base.

We have a model that inheritance from another model, the active_record? check doesn't work correctly.

Class A < ActiveRecord::Base
end

Class B < A
end