Add migration status to the sql structure dump

This adds functionality introduced by Rails upstream.  For structure dumping, it appends the data of the `schema_migrations` table or equivalent into `#{Rails.env}_structure.sql` file so that when tasks like `rake db:reset` or `rake db:setup` are used, the migration state is kept in the database.