[lld][PECOFF] Calculate SizeOfHeaders field instead of using a hard-coded value

Summary: This patch changes WritePECOFF to calculate the value of the SizeOfHeaders PE header field instead of just using 512.

Reviewers: rui314, ruiu

Reviewed By: ruiu

CC: llvm-commits, ruiu

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

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