During review of "[ELF] Support PHDRS command" (http://reviews.llvm.org/D15191)
it was mentioned that current code to create a program header it's not easy to read.
And solution could be to have a class or a function that create a list of program header fields,
and associate OutputSections to zero or more program header field. I am agree with that.
So this patch do this. It introduces new method scanHeaders() which builds the program
headers map. This map contains the list of all headers, its flags and output sections lists
associated to each. assignAddresses() was changed to use that.
This prepares code for linker script implementation.
This needs comments.