[PECOFF] Support COMDAT associative sections.

COFF supports a feature similar to ELF's section groups. This
patch implements it.

In ELF, section groups are identified by their names, and they are
treated somewhat differently from regular symbols. In COFF, the
feature is realized in a more straightforward way. A section can
have an annotation saying "if Nth section is linked, link this
section too."

Implementing such feature is easy. We can add a reference from a
target atom to an original atom, so that if the target is linked,
the original atom is also linked. If not linked, both will be
dead-stripped. So they are treated as a group.

I added a new reference type, kindAssociate. It does nothing except
preventing referenced atoms from being dead-stripped.

No change to the Resolver is needed.

Reviewers: Bigcheese, shankarke, atanasyan

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D3946

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@210240 91177308-0d34-0410-b5e6-96231b3b80d8
Print error message in LinkOnce handler.

Rather than outside of the handler function to make the code simple.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@210241 91177308-0d34-0410-b5e6-96231b3b80d8
Add SymbolTable::isCoalescedAway

isCoalescedAway(x) is faster than replacement(x) != x as the former
does not follow the replacement atom chain. Also it's easier to use.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@210242 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[PECOFF] Support COMDAT associative sections."

This reverts accidental commit r210240.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@210243 91177308-0d34-0410-b5e6-96231b3b80d8