This test is intending to test behavior in the presence of a state snapshot
but was achieving that using the legacy state snapshot format that we
preserved only for its previous (now eliminated, in an earlier commit)
purpose of implementing the CLI backend state format.
Instead, we'll construct a state snapshot format using the modern API for
doing that, which therefore constructs a modern state snapshot file as
would be created by today's Terraform.
This eliminates the last use of the "legacy/terraform" package aside from
the calls from other packages under "legacy".