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`
Let's avoid the indirection of having this moduke implementing this logic on the migrate method of the database task.