Update elf.c

-Bug correction, type change, reorganization of code rewrite of how to return errors.
-MEGetLastError() added.
-MEGetProgHdrCnt(read_image_t) added: can be called prior mapping, for the allocation for the mmap's and fmap's.
-All non exportable function has underscore now. 3 functions exportable.
- ME_Err, global var, must not be exported thought.