Fix visited status lock

We were accidentally acquiring the lock based on the post id, but we needed to acquire it based on the thread id. We still had a race condition if you attempted to visit two different posts simultaneously.