libdm: Add a helper function for GetState+DeleteDevice checks.

Bug: N/A
Test: manual test
Change-Id: Ie97b63b53f548af1e82b73893fa491fac42b32ea
2 files changed