Changed MigrationWriter to look for a "deconstruct" attribute on functions.

Refs #20978.