[ELF] Remove duplicate code.

The base class ELFObjectReader/ELFDSOReader implement the canParse functionaity
with this change.