Only call ActiveRecord::Base.clear_active_connections! if possible.

In some cases, ActiveRecord can be defined, even if ActiveRecord::Base is not.

We have one such wonky case.