DebugInfo: Factor out parsing compile unit DIEs to a separate function. Improve code style and comments.

No functionality change.