Rewrite ElfBuilder to make streaming directly to file easier.

The previous design required knowing all the sections and their
sizes before even the first byte of the file was written.

The new design allows sections to be written one by one without
any knowledge of later sections.  Furthermore, as soon as
section is started, its virtual memory address is known,
which removes the need for the various patching passes.

The new ElfBuilder essentially tries to be a thin wrapper
around OutputStream which keeps track where the various
sections start/end and then writes their ELF headers.

Change-Id: I817e7f3b41882e4e4b9b442cfe56e4ef2e26babd
12 files changed