Implement write operation for flat-file based message storage
Summary: Implements write operation for flat-file based message storage. It aither appends message to main storage file, or creates temporary file with random name if semaphore acquisition failed.
Test Plan: Use implemented method in NotificationService to write to main storage.
Reviewers: palys-swm, varun, karol-bisztyga
Reviewed By: palys-swm
Subscribers: ashoat, Adrian, atul, yayabosh
Differential Revision: https://phab.comm.dev/D4393