After https://reviews.freebsd.org/D37615 was merged I received a some feedback on how to better use libxo from Phil, which can be found in https://reviews.freebsd.org/D53110. This PR addresses some of it, like tags should be lowercase, but it does not remove all nested containers/lists and replace them with {k:} or {l:} where it should be possible, as I thought that made the JSON/XML output look wrong from how I wanted it to look. I also renamed a few containers so that the JSON/XML output says "DISK" or "MULTIPATH" (depending on class) instead of a generic "Geom", which I thought was a nice touch, and it makes the --libxo:XP output resemble kern.geom.confxml some more.
Added some conditional checks to handle null derefs that appeared on some places.
As I was working on the above I noticed that the previous patches "broke" geom <class> status -s (script mode), the normal output was looking slightly off from how it used to, so I fixed that. And I also noticed that the JSON/XML outputted data looked different from when you used the flag vs if you didn't. This is now also fixed. Lastly, I added {t:} to trim extra whitespaces that sometimes appeared in the value fields of JSON/XML output.