ENH: make AffinePlugin work

Adds the RegistrationState class to pass information in a
generic fashion to callbacks in plugins.