Merge pull request #10424 from markevich/fix_test_prepare

Restore ActiveRecord connection to original environment after rake:db:test:prepare task.