[lib] Introduce getUploadIDsFromMediaMessageServerDBContents(...)
Summary:
Introduce getUploadIDsFromMediaMessageServerDBContents(...) and consume in fetchUploadsForMessage(...) and assignMessageContainerToMedia(...).
Simple refactor to reduce redundant code.
Addresses feedback from @ashoat here: https://phab.comm.dev/D5087#inline-33653
Test Plan: Simple refactor, things continue to work as expected when sending media messages. Set breakpoints and ensured that values at each step were as expected.
Reviewers: abosh, tomek, marcin, varun
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D5190