[ticket/12996] Fix reliability issue in flock test.

$delta was always an int - so, this test would sometimes fail if you
happened to call time() /very/ close to a 1s boundary.

Found by HHVM's continuous testing.

Replaces https://github.com/phpbb/phpbb/pull/2890
https://tracker.phpbb.com/browse/PHPBB3-12996