fix(runtime): transition silo status before grain deactivation

Merged
RE
3mo ago
+283-6

Grains using PreferLocalPlacement could select the shutting-down silo when MigrateOnIdle() was called from OnDeactivateAsync, because membership status publication and grain deactivation ran concurrently.

This changes the shutdown lifecycle ordering so the silo publishes ShuttingDown before grain deactivation begins, then keeps the distributed grain directory available until shutdown-triggered migrations complete. It also adds a two-silo regression test which covers migrations both before and during asynchronous directory ownership handoff.

Microsoft Reviewers: Open in CodeFlow