Add file locking mechanism to make thread safe.

Implement a FileLock mechanism that uses soft links to create a lock.
Create new OODictYamlLock class that uses FileLock and make User
class a subclass of OODictYamlLock.

Every call to lock_n_load locks db.yaml by creating a db.yaml.lock
soft link (atomic operation). If link (lock) already exists, call will
block up to a defined timeout after which it will break the lock.

Also, when saving, data is dumped to db.yaml.tmp file and then moved in
position (atomic operation) to avoid a thread reading halfwritten data.
Fifth Merge branch 'mist_upgrade' of github.com:mistio/mist.io into mist_upgrade