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, which easily happens if you look at a thread in your email client for the first time that has multiple posts. (All of them will try to be marked as opened.)