Fix assertion failure when retrying to migrate a workflow history

When a first migration was reverted for any reason (e.g. ConflictError),
the assertion failed because __setstate__ was not called yet to fix the
class back to the old one.
10 jobs for arnau
in 0 seconds, using 0 compute credits, and was queued for 0 seconds