Fixed table/column renaming bug in migration process.

If the migration process decides to rename a table or a column it needs to make sure that it does not rename multiple tables or columns to the same name. Thus I've implemented a `$renamed` array that tracks each renaming so we don't have a duplicated renaming.
Merge pull request #398 from marcj/fix-migration

Fixed table/column renaming bug in migration process.