many: do without device state/assertions accessors based on state only outside of devicestate/tests
Because under remodeling we have two models, the current one, and the new model to be, lots of operations to be correct need to get the device state, model assertions in a contextual manner, via the new snapstate.DeviceCtx for example. The previous accessors solely starting from state are dangerous, do without most of them and reduce the surface of DeviceManager as well.
Device and SetDevice are still available for tests through devicestatetest (This is achieved introducing a devicestate/internal package).
DeviceManager is not directly a storecontext.Backend anymore, but can provide one via its StroreContextBackend method.
This leaves a few XXXs that will need to be addressed soon.
A follow will also use a registrationContext indirection instead of directly the DeviceManager in much of the registration handling code, to allow its reuse in a remodeling change.
interfaces/dbus: fix unit tests when default snap mount dir is not /snap
Unit tests assumed that default snap mount directory is /snap, but did not mock
the distro. Stick to whatever is correct for the host, and use proper paths
instead.
Signed-off-by: Maciej Borzecki <email address hidden>