Use a stable topological sort in DwarfCompileUnit::createScopeChildrenDIE()

This addresses review feedback for D42940. The topological sort is
slightly more expensive but it can now also detect cycles in the
dependencies and actually works correctly.

rdar://problem/37217988

Differential Review: https://reviews.llvm.org/D43036

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324677 91177308-0d34-0410-b5e6-96231b3b80d8
4 files changed