core: Fix various state-pruning-related test failures
core: Fix various state-pruning-related test failures

These tests show that we're still not fully pruning modules from the state
in all cases, due to us not being able to fully prune out modules that
contain resources with count set after a destroy, but this is no worse
than before so we'll accept it for now and address this separately later.

A module heading without "<no state>" but also without any instances
listed is the rendering for a module containing a resource that has no
instances, since our old string rendering of state doesn't represent
resources themselves.

apparentlymart/terraform,heimweh/terraform,tpounds/terraform,rnaveiras/terraform,ewbankkit/terraform,gechr/terraform,rnaveiras/terraform,pdecat/terraform,gechr/terraform,iljaskevic/terraform,mattray/terraform,nlamirault/terraform,ewbankkit/terraform,tommynsong/terraform,tpounds/terraform,brandontosch/terraform,heimweh/terraform,iljaskevic/terraform,tommynsong/terraform,mattray/terraform,tommynsong/terraform,mattray/terraform,youhong316/terraform,iljaskevic/terraform,nlamirault/terraform,rnaveiras/terraform,ewbankkit/terraform,tpounds/terraform,hashicorp/terraform,youhong316/terraform,luis-silva/terraform,tpounds/terraform,mattray/terraform,drebes/terraform,drebes/terraform,hashicorp/terraform,iljaskevic/terraform,pradeepbhadani/terraform,drebes/terraform,hashicorp/terraform,youhong316/terraform,brandontosch/terraform,brandontosch/terraform,VladRassokhin/terraform,pryorda/terraform,VladRassokhin/terraform,youhong316/terraform,pdecat/terraform,heimweh/terraform,apparentlymart/terraform,pryorda/terraform,luis-silva/terraform,apparentlymart/terraform,luis-silva/terraform,pdecat/terraform,drebes/terraform,ewbankkit/terraform,heimweh/terraform,brandontosch/terraform,gechr/terraform,VladRassokhin/terraform,pdecat/terraform,apparentlymart/terraform,VladRassokhin/terraform,brandontosch/terraform,luis-silva/terraform,nlamirault/terraform,pryorda/terraform,apparentlymart/terraform,pradeepbhadani/terraform,heimweh/terraform,pradeepbhadani/terraform