refactor: Move metadata checks for s3 export.
refactor: Move metadata checks for s3 export.

This technically broadens the check for user_profile_id,
but we write that metadata on every record.

kou/zulip,kou/zulip,andersk/zulip,rht/zulip,kou/zulip,eeshangarg/zulip,zulip/zulip,rht/zulip,rht/zulip,eeshangarg/zulip,kou/zulip,zulip/zulip,zulip/zulip,zulip/zulip,eeshangarg/zulip,rht/zulip,andersk/zulip,andersk/zulip,kou/zulip,rht/zulip,eeshangarg/zulip,rht/zulip,andersk/zulip,rht/zulip,zulip/zulip,zulip/zulip,eeshangarg/zulip,andersk/zulip,eeshangarg/zulip,andersk/zulip,kou/zulip,andersk/zulip,zulip/zulip,kou/zulip,eeshangarg/zulip