[keyserver][lib] Support new avatar type for encrypted images
Summary: This diff modifies lib and keyserver utilities to support new avatar upload type.
Test Plan: Flow does not fail anymore. These changes are more deeply tested with D9170 and D9624.
Reviewers: atul, ginsu
Reviewed By: atul
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D9168