fix lockblock bug in checkpoint thread

when do check point work, if exception happens,  blocks of the file will not be unlocked and related OutputStream & InputStream will not be closed.
it is OK, unlocking is on the block files that cached in memory,  renaming is on the check point file. after the checkpoint file is finished, we can first unlock the block files and then rename the checkpoint file