journal: file end condition updated

the free space is at the end of file if:
- the file is empty OR
  - qhead.pos <= qtail.pos
  - free.pos > qtail.pos

tests: added randomized values per each read/write