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 supporting 'ld --buildid'

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

uuid-style buildid can't be supported on MinGW due to lack of /dev/urandom.

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.

Note that the pe/coff build-id is a fixed length of 16 bytes, not a variable
length like an ELF .note.gnu.build-id.

XXX: There is an unfortunate degree of code duplication between 32 and 64 bit
pe/coff variants, but this is hard to avoid given the way the code is
structured. :-(

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Regnerate ld/Makefile.in
Debug output

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