common: Fix Lockfile::lock() implementation

In Lockfile::lock() we create new file in file system
by using ::open(), accidentaly we postponed ::close() call
until after boost managed to acquire lock in this file.
Linux fcntl() F_*LCK semantics made it so that lock acquired
by boost was lost when we called ::close().
To fix this issue we moved close before call to boost lock.

Change-Id: Ifa4fd408a724df6bfdebfe6ce67913dd88079f80