Nested template instance function must be weak/one-only

With the last commits it's now possible to have nested functions
which are also template instances (see runnable/gdc.d test). This
means we have to make those nested functions weak to make sure
they get merged with other template instances. The check in
d-objfile prevented exactly this case from working. It's unclear
if the check is still needed at all as it was written for an old
gcc version. The test suite shows no regressions when removing it.
Add test cases for issue 35

The last commits also fixed issue 35.