Change the logic of the synchronization before recording

Add tm_unsync_pre_record to do the synchronization before enabling record.
Move all the synchronization logic out from vmx_check_rr_commit and
tm_unsync_commit.

Signed-off-by: Le Tan <tamlokveer@gmail.com>