Made MigrationWriter look for a "deconstruct" attribute on functions.

Refs #20978.