implement "caught-up" logic for LLSR

This compiles, but whether it does anything sane is not clear.

Also, WalSndWaitForWal needs to be taught about the whole business.