Fixes #237 - Re-wrote logic to properly set last visit time when user is invisible.

My first mybb code submission!  Let me know if this makes sense or if I goofed somehow.  I tested it and it seemed to be doing what it should be doing now.