Rework UserIdProxyModel data handling
Instead of the previous approach of figuring out the correct source index for each request,
this implementation creates a list of all user ids in the model when the model changes.
This approach drastically improves the performance of each lookup and allows for better prevention
of duplicate user ids in the model.
(cherry picked from commit 4873d228a0e811d85f970dad8d5e30da01cf13b1)