[TASK] Add support for file locking in (Simple)FileBackend (Revision 25)

With concurrent access the current FileBackend and SimpleFileBackend can
be racy, this patch adds a strict file locking when writing and shared
locking when ready to avoid this problem.

Change-Id: Iaf0b42cf94c1e9fd4392267dda5afef4042b0be7
Related: #53262
Releases: master
Revision-Id: 248c1bf4cc83eb35855f3fc4f62f6725a25e3e0d