lib: sm: Add API to keep track of VM references

We want to avoid destroying a VM while it has
live references, e.g., there are still shared memory
objects from it.

Bug: 280886201
Change-Id: I2d6db83cd66e0aee722744a2d4db2cec425c37fc
2 files changed