migrations: Read metadata from up migration files
Created by: efritz
Fixes #29547 (closed). This PR adds metadata into existing migration files and reads/validates them during migration. This is a step in introducing the (currently redundant) information that we'll need to explicitly supply as we remove the dependency on sequentially numbered migrations.
Later, we will be able to drop some of the redundant validation here, allowing fewer conflicts to occur when new migrations are merged.