Refactor map_elf_phdrs into elf_loader_t

Partially implements an optimization to avoid an extra mmap() syscall in
favor of read().  The private loader still mmaps the whole file to
get the address of the .text section.

Prepares to reuse the loader code to implement ptrace-based injection.

Review URL: https://codereview.appspot.com/6901057

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1812 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6