While learning the semantics of IsMasterPlan and OkayToDiscard, and guided by the
FIXME comment in ThreadPlan.h, this change decouples the two functions.
These two functions have been called in pairs, for example:
SetIsMasterPlan(true); SetOkayToDiscard(false);
With this change, almost all cases turn into a single SetIsMasterPlan(true) call. Note
that m_okay_to_discard now defaults to false.
Most of the decoupling happens in ThreadPlanStack::DiscardConsultingMasterPlans, which
handles OkayToDiscard and IsMasterPlan individually. This function could be renamed,
but I haven't thought of a good alternative.
Other notes:
- OkayToDiscard is no longer virtual
- ThreadPlanPython was incorrectly calling SetOkayToDiscard(true)
- Reworded some comments
This is the only remaining SetOkayToDiscard(true) call.