Improve chainlock logging to associate a serial number with each
lock/unlock pair so you can match up the locks/unlocks when reading the log file. Separate out the int incrementer used for counting undo sessions from the one used for logging in order to avoid generating confusing log messages