fix Issue 10711 - shared phobos library should not depend on _Dmain

http://d.puremagic.com/issues/show_bug.cgi?id=10711

This moves code that was formerly in druntime's src/rt/entrypoint.d into the compiler itself.