Use reader/writer locks in storage

Switch to using a reader/writer lock scheme to
protect against simultaneous storage mutations,
typically seen when running in a multi-threaded
mode.

For the single-threaded mode provide a dummy
reader/writer lock which will mimic the locking
api but not actually lock anything.

Closes-Bug: 1273146
Change-Id: I954f542d9ab34b693e8da71c9fc913f823e869ba
Merge "Use reader/writer locks in storage"