Add reading/writing of pe/coff debug directory and codeview records

Add routines for reading and writing of the debug directory entries in a pe/coff
header.

Also add routines for reading and writing a codeview record which may be pointed
to by a debug directory entry.

This tries to match the existing style, but not sure if it succeeds. Not sure
how to handle the variable length pdbfilename the codeview record contains, but
it's not very interesting, so just leave that out for the moment.
Dump pe/coff debug directory in objdump -p

Add dumping of pe/coff debug directory in objdump -p
Decode codeview entries in the debug directory to report the build-id recorded there
Factor out common code for 'ld --buildid'

Factor out the code for parsing the 'ld --buildid' option and calculating the
build-id, which will be common between ELF and COFF implementations, as
ldbuildid.c.  Place prototypes in ldbuildid.h.

Slight adjustments are needed since pe/coff build-id is a fixed length of 16
bytes, not a variable length like an ELF .note.gnu.build-id

XXX: This doesn't include the regeneration of ld/Makefile.in, as I don't have
the correct automake version available.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Add ld --build-id support for pe/coff

Add ld --build-id option for pe/coff, which adds a .build-id section containing
a CodeView record, pointed to by the debug directory.

In a somewhat similar way to the ELF build-id, this build-id is captured by the
OS in the MiniDump written for a crashing process.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Debug output

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Regnerate ld/Makefile.in
Add ld --build-id support for pe/coff x86_64

XXX: This involves rather a lot of code duplication :-(