Build dmd as static libraries on posix
Merge pull request #2932 from yebblies/posixlib

[DDMD] Build dmd as static libraries on posix
Improve COMPILE_SEPARATELY to supply optional compiler switches when link .o files
Improve error propagation from function body semantic.
Change inNonRoot function to Dsymbol class member
fix Issue 11931 - Linkers "Symbol Undefined" again with dmd HEAD when -g specified

Also add test case for issue 7595.