Extend bhyvectl(8) to support querying VM pid using the
--get-vm-pid flag.
This is useful in the monitor mode when the VM pid differs
from the main bhyve(8) process run by the user. Knowing the VM pid
is necessary, for example, to query process resource usage or
trigger ACPI shutdown with SIGTERM.
Of course, it could be obtained by matching the monitor process
children by the process title, but it's a little more complex
and fragile than it could be.
Implement that by introducing the VM_GET_PID ioctl to vmm(8),
exposing that through libvmmapi, and using it to implement
bhyvectl --get-vm-pid.
When the VM pid is not known, ESRCH is returned.
This information is now also included in the bhyvectl --get-all
output. The --get-vm-pid fails when vm_get_pid() returns ESRCH,
and --get-all just skips it in this case.