Rework DynELF to use consolidated routines for resolution

Consolidate the _32 and _64 variants of all DynELF routines.
Remove use of magic numbers, and add `pwnlib.elf.datatypes` to replace them with real constants.
Re-write `from_elf` to use a simulated leaker to prevent code duplication.