Further narrow Object#wait handling in threaddump
Refactor dfe948836e284fb339d1962f84cf919142c20eee