Replace the buggy next_migration_number implementation with what ActiveR...

...ecord::Generators::Base already have.

The current implementation of next_migration_number generates VERSION numbers that are too long. This results in these migrations been run last every time even if other migrations are created after these. Resulting in issues like : https://github.com/muratguzel/letsrate/issues/14

So just use what ActiveRecord::Generators::Base already have implemented.

https://github.com/rails/rails/blob/master/activerecord/lib/rails/generators/active_record.rb#L19