[caffe2] plan_executor_test: add test case for should_stop loops (#47613)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47613
This is to test some more cancellation edge cases that were missing before. It passes under the current code.
Test Plan: buck test mode/opt caffe2/caffe2:caffe2_test_cpu -- PlanExecutorTest --stress-runs 10
Reviewed By: dahsh
Differential Revision: D24836956
fbshipit-source-id: 3b00dc081cbf4f26e7756d597099636edb49d256