[identity] fix add_reserved_usernames RPC
Summary:
Since there aren't that many users in the users table currently, it's cheaper to just get all the usernames from DDB and then compare with the list from keyserver using HashSets.
Also fixed the BatchWriteRequests -- DynamoDB didn't like that we were sending more than 25 items per request, so I broke up the usernames list into chunks of 25. Also, I removed the retry logic for unprocessed items because we should rarely have those.
Test Plan:
- Inserted 1000 new users with usernames into my local MariaDB users table.
- Ran the cron job that calls the AddReservedUsernames RPC.
- Confirmed that all the new usernames were in the prod DynamoDB reserved usernames table. Existing users (e.g. ashoat), were skipped.
- Cleared the DDB table.
Reviewers: jon, bartek
Reviewed By: bartek
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8631