[identity] Add verification for replacing a device
Summary:
Added possibility to replace a device in device list
Depends on D11687
Test Plan:
- Added unit tests
- Called UpdateDeviceList RPC with payload that replaced exactly one device - pass
- Called UpdateDeviceList RPC with payload that tried to replace primary device - fail
Reviewers: varun
Reviewed By: varun
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D11711