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

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

Change-Id: Ib5cacb4e8a0784814bd863ae19b591acd540e4ef
Releases: master
Revision-Id: ecee4657642600d7edad51f0cf5735bf7ce67635