fix issue 10694 - wrong purity check for static variables with impure
destructor
fix Issue 10676 - excessive compilation times with optimized PIC build
Merge pull request #2375 from WalterBright/fix10676

fix Issue 10676 - excessive compilation times with optimized PIC build
Merge pull request #2373 from hpohl/10694

fix issue 10694 - wrong purity check for static variables with impure destructor