Add ActiveRecord::Tasks::DatabaseTasks.migrate

This extracts the logic that was embedded in a Rake task into a static method.
Bonus: the first test for `rake db:migrate`
I folded it into `DatabaseTasks.migrate` and you're right that it's way better all in one place. Thanks!