Add VM ref holding to Virt Manager

So as to support running VMs from `adb shell` without a persistent
session (closing the shell), add two new methods to Virt Manager AIDL:
debugVmHoldRef and debugVmDropRef. The former will accept a strong VM
reference from the user and store it inside Virt Manager. The latter
can be used to retrieve the reference by CID and will make Virt Manager
drop it. Both are limited to the shell user.

On the `vm` tool side, a new '-d/--daemonize' flag is added to the
'vm run' command which calls debugVmHoldRef after a VM is created and
exits. 'vm stop <cid>' command is added to allow killing a previously
daemonized VM.

Bug: 182254712
Test: vm run -d <json>; vm list; vm drop <cid>
Change-Id: Ic7198b3fc7a19688fca762ec04dd2430a7626222
4 files changed
tree: b05565f68294ead383629f3d841c164c69c2ea92
  1. apex/
  2. authfs/
  3. docs/
  4. microdroid/
  5. tests/
  6. virtmanager/
  7. vm/
  8. .clang-format
  9. PREUPLOAD.cfg