[lldb][nfc] Factor out repeated code in DWIM Print (#85669)

The code that prints ValueObjects is duplicated across two different
cases of the dwim-print command, and a subsequent commit will add a
third case. As such, this commit factors out the common code into a
lambda. A free function was considered, but there is too much
function-local context required in that.

We also reword some of the comments so that they stop counting cases,
making it easier to add other cases later.

GitOrigin-RevId: 65d444b9edb895443754c13d9c008af180eb5c71
1 file changed