[keyserver] Fix avatarUpdateQuery
Summary:
Just introduced this in D7430 and noticed a slight issue that left container column of an image avatar set until we set another image avatar.
Specifically, if we had an image avatar and switched to emoji avatar the container field of the previous image avatar upload would remain set.
This wouldn't cause any issues in practice (as things are now), but the state of the DB would not be "corrected" until we subsequently set an image avatar.
In order to fix this we adjust the logic to match what we have in the final UPDATE threads... query.
Test Plan:
- Switch from image avatar to image avatar and ensure that contents of uploads table and threads table are correct.
- Switch from image avatar to emoji avatar and ensure that contents of uploads table and threads table are correct.
Reviewers: ashoat, ginsu
Reviewed By: ashoat
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D7435