[TASK] Add a generic lock class (Revision 4)

This change provides a generic lock class and
a flock based lock implementation.

Change-Id: Ib5cacb4e8a0784814bd863ae19b591acd540e4ef
Releases: master, 2.1
Revision-Id: 321e03875ecce3594e776ed2d5354cfdf9aa83b7