SROA: Microoptimization: Remove dead entries first, then sort.

While there replace an explicit struct with std::mem_fun.