Initial support for emitting DWARF for static vars.

Only supports crate level statics. No debug info is generated for
function level statics. Closes #9227.