[identity] Add function to check if device exists
Summary:
Added a simple query to check if Device item exists in database. Limited projection to avoid fetching all columns.
Depends on D10217
Test Plan: Called this for existing primary key and non-existing primary key.
Reviewers: michal, varun
Reviewed By: michal
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10218