rustc_trans: Link with --whole-archive

Linker treats archive files differently than object files.
If archive file is given, linker scans each object and checks
checks if it contains symbols which has been undefined.
Therefore the output does not contain objects if not used.

This behavior can be overriden by adding `--whole-archive` flag.
However, since non-object files are also in rlib, they should be
removed or linker fails to understand them.

Also, this can be problematic if several archives contain same
symbol. For example, this patch breaks code like:

```Rust
    #![crate_type = "rlib"]

    // `cfoo` is external archive containing `foo` symbol.
    #![link(name = "cfoo", kind = "static")]
    extern {}

    // `foo` is also defined here!
    pub fn foo() {}

    // so this rlib archive has two `foo` symbols.
```

Previously it succeeded to build because `cfoo` is not used
therefore not contained in build.

So.. later we may need explicit flag e.g.
`#[link(name = "cfoo", kind = "static", whole_archive = "no")]`?

[antigithubspam]
Fixes
1
4
3
4
4