Fixes a bug where cpu scheduling failed to follow thread migrations due to caching that was added without invalidation on a migration.
Adds a test by checking in a simple_app trace with a migration and ensuring we see both recorded cpus.
Fixes #5709 (closed)