Require 'active_record/base' in rake task

This pull request backports #526 to `master` branch since https://github.com/rails/rails/commit/ee484ec04ceaaedcb9a92f0d8871f65b2a5e2a39 has been pushed to rails `4-1-stable` branch.

This may cause `Rails.application.config.active_record` inside of an initializer no effects.