qom: Implement info qom-tree HMP command

To complement qdev's bus-oriented info qtree, info qom-tree
prints a hierarchical view of the QOM composition tree.

By default, the machine composition tree is shown. This can be overriden
by supplying a path argument, such as "info qom-tree /".

Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
diff --git a/monitor.c b/monitor.c
index 8b703f9..42116a9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2890,6 +2890,13 @@
         .mhandler.cmd = hmp_info_qdm,
     },
     {
+        .name       = "qom-tree",
+        .args_type  = "path:s?",
+        .params     = "[path]",
+        .help       = "show QOM composition tree",
+        .mhandler.cmd = hmp_info_qom_tree,
+    },
+    {
         .name       = "roms",
         .args_type  = "",
         .params     = "",