driver: Factor out entry point module emission code.
Add pragma(LDC_extern_weak) for symbols with (ELF-style) weak linkage.

For now, this is only an internal feature to be used in the
implementation of rt.sections_linux.
driver: Support code for shared library collision detection.
Merge pull request #670 from klickverbot/fix-collision-detection

Add LDC_extern_weak pragma, fix shared library collision detection.