Refactoring of swissknife migrate to allow for different migration steps

This factors out some reusable migration steps into a common base class.