[ELF] Fix use of LLVM RTTI.
[Core] Add iterator ranges.

This is based on code by Jeffrey Yasskin. It has been modified to compile
with MSVC and reformated to LLVM style.
[ELF] Replace [...] x_{begin,end}() with range<[...]> x().