Changes synchronization between LogFile and TransactionAppender

such that transactions cannot be appended and rotated away before properly
applied and closed. TransactionAppender now grabs the same monitor while
appending, as LogFile does when rotating.