DebugInfo: Fix and test a regression caused by r207263 causing the DW_AT_object_pointer to go missing on blocks

Noticed by inspection. Test coverage added.

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