fix Issue 12010 - Undefined template symbols for static library linked with debug symbols

Struct destructors and postblits will be stored in TypeInfo. So, partial semantic3 running for structs declared in non-root modules should also consider them.
Merge pull request #3165 from 9rnsr/fix12010

[REG2.065a] Issue 12010 - Undefined template symbols for static library linked with debug symbols