Fix infinite loop when fopen failed when obtaining lock

If for some reason fopen() fails in obtainReadLock() or
obtainWriteLock(), the function now returns with false instead of
needlessly trying to acquire a lock.

The original issue had the "false" $handle caused an infinite loop in
the do-while block.
[tx-robot] updated from transifex
Merge pull request #1820 from owncloud/flock-fopenfailedfix

Fix infinite loop when fopen failed when obtaining lock
[tx-robot] updated from transifex
[tx-robot] updated from transifex
Updated version for OC6
Merge branch 'master' of github.com:alysisLeonis/apps