File#flock: ensure that flock blocks

this tests fails currently under JRuby 1.7.0, so it might be nice to have.
Merge git://github.com/minad/rubyspec
Fixed File#flock spec.

1. ScratchPad records control flow.
2. Local variable 'running' ensures no race in Thread t running.
3. The sleep call simulates waiting forever, which is a lie

Specs of this sort have only a percentage of correctness < 100% because we
can't say if the File.open call succeeded after 0.500001 seconds. The same is
true if we increase the wait time to 0.6 seconds, or in general, any N + d
where d -> Inf seconds. However, since this is a local file system and we
expect latency to be very low, the spec is *likely* correct.