Updated for the 2007.3 release while maintaining compatibility
with prior releases.
2007.3 and later servers might rotate the journal by renaming it
rather than copying and truncating it. A renamed journal is now
detected by comparing the device and inode returned from statting
by the journal's file name and statting by the journal's file
descriptor. This algorithm (suggested by J.T. Goldstone; thanks J.T.!)
is faster than reopening the journal and seeking if the journal was
not rotated (~2.0 seconds vs. ~2.7 seconds for 1,000,000 iterations
on my laptop).