Introduce LDBG_OS() macro as a variant of LDBG() (#157194)
Also, improve LDBG() to accept debug type and level in any order, and
add unit-tests for LDBG() and LGDB_OS().
LDBG_OS() is a macro that behaves like LDBG() but instead of directly
using it to stream the output, it takes a callback function that will be
called with a raw_ostream.
Co-authored-by: Andrzej WarzyĆski <andrzej.warzynski@gmail.com>