Change some version checks to use ActiveRecord.

This allow using ActiveRecord fixtures without pulling in all of Rails.

(#804 rebased on top of current master so the tests have an opportunity to run green)