[lld] Move AtomLayout from ELF to Core so that it can be used by non-ELF writers.

Summary: I'm planning to use AtomLayout in WriterPECOFF.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D977

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@184062 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][PECOFF] Support IMAGE_REL_I386_DIR32 relocation.

With this patch, it can now resolve relocations in the same output file.
"Hello world" program does not still work because call to the DLL routine
is not supported yet.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D985

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